REF : PHP: Suppress output within a function?
Using the method suggested at the above link, i tried to suppress the output of mail function in PHPMAILER. But seems it suppresses the mail itself. What's the alternative to suppress the echos by mail library, so that a single echo $returnValue can be achieved ?
ob_start();
include('mail.php'); //<< USING PHPMAILER
ob_end_clean();
echo $returnValue