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 = 'xyz@gmail.com';
$mail->Password = 'xxxxx';
$name='testname';
$mail->SetFrom('testmail.com', $name, true);
$mail->AddReplyTo('no-reply@mycomp.com','no-reply');
$mail->Subject = 'subject';
$mail->MsgHTML($body);
$mail->AddAddress('xyz@gmail', 'title1');
//$mail->AddAddress('abc2@gmail.com', 'title2'); /* ... */
$fileName='../rough/test.pdf';
$mail->AddAttachment($fileName);