Here When I am sending the mail through phpmailer, username testname get on mail. However I want testname to be displayed. What I understand from the phpmailer is the $mail->Username and $mail->Password is required to authentication and $mail->Username is also used at envelope mail. Is there any way to change testname to testname. And I also tried to set $mail->Sender, still not working. I know I am doing some silly mistake here, but I am stuck here now. Any help will be appreciated. Thanks in advance.
$mail->Username = '[email protected]'; $mail->Password = 'xxxxx'; $name='testname'; $mail->SetFrom('testmail.com', $name, true); $mail->AddReplyTo('[email protected]','no-reply'); $mail->Subject = 'subject'; $mail->MsgHTML($body); $mail->AddAddress('[email protected]', 'title1'); //$mail->AddAddress('[email protected]', 'title2'); /* ... */ $fileName='../rough/test.pdf'; $mail->AddAttachment($fileName);