Reputation: 461
I am using PhpMailer to send emails via gmail smtp. And while $mail->setFrom('[email protected]','Jack Schmitt');
does insert 'Jack Schmitt' as the name of the sender, it is still including my smtp username. So the recipient will see something like this: Jack Schmitt<[email protected]>
in the From: line
Is there a way to have it say Jack Schmitt<[email protected]>
in stead?
Upvotes: 0
Views: 234
Reputation: 37710
You can't send using arbitrary from addresses, because that would usually be forgery. You can only send from your account address or predefined (in gmail settings) aliases. This is a gmail feature covered in their docs.
Upvotes: 1