Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ques about PHPMailer usase?

6 views
Skip to first unread message

bo...@worthless.info

unread,
Mar 5, 2016, 1:48:43 PM3/5/16
to
Of course when using this function one must supply a valid username
and password for the mail account being used, however,
is there a way to set the "From" name on the generated message to show
the pseudo from name and NOT the username of the account used for
sending?
I've been using
$mail->Username to hold the account userid
and
$mai->SetFrom to hold the email "from" name and even set the
$mail->From to the same
and the generated emails ALL show the account username.

Any clarification/ideas appreciated.

Thank you.l

J.O. Aho

unread,
Mar 5, 2016, 3:47:54 PM3/5/16
to
On 03/05/2016 07:48 PM, bo...@worthless.info wrote:
> Of course when using this function one must supply a valid username
> and password for the mail account being used, however,
> is there a way to set the "From" name on the generated message to show
> the pseudo from name and NOT the username of the account used for
> sending?

As I'm not really using phpmailer, the first answer may not be entirely
correct.

It seems like phpmailer has feature which makes it not possible, so that
the script will not be used by sapmmers.



Another thing that will affect is the SMTP, it can be configured to
always use the account user details instead of those you have selected
in the mail() function, this to make it simple to track who sent the
mail and also prevent people from using their mail account from spamming.


> I've been using
> $mail->Username to hold the account userid
> and
> $mai->SetFrom to hold the email "from" name and even set the
> $mail->From to the same
> and the generated emails ALL show the account username.
>
> Any clarification/ideas appreciated.

Look at the phpmailer code, look if you find the mail() function or
where they do tcp connections, make the script to log the from address,
if the address is the one you wanted it to be, then the SMTP is
overriding you. If the from address is wrong, then you have to just find
where in the phpmailer code the from address is switched and remove the
switch.


--

//Aho

0 new messages