How to hide sender email address using phpmailer?

I use phpmailer to send email. I need to know how to hide or mask the sender email address.

+4
source share
6 answers

This is a rare situation that arises here ... if you do not have a mail server, you can still tell PHPMailer to send messages from another address, just set the attribute of the Fromobject PHPMailerto PHPMaileryour address. But wait! if your server does not exist, the client cannot verify the account, and then your mail will be more likely to be deleted (moved to spam in a more favorable scenario). If you are trying to imitate third-party mail, I will not help you anymore.

Note . Your mail server may be valid, but clients still cannot check it, and therefore you receive emails delivered to spam or deleted. Check the โ€œMust Readโ€ box below to find out how to fix this problem.

, , PHPMailer, , Host Port . , , Username Password, SMTPAuth = true; SMTPSecure = 'ssl'; . [: Username From ]


, Gmail, Gmail [ Settings-> โ†’ โ†’ () ], , , , , , Gmail . PHP.


, PHPMailer , , AddReplyTo('me@example.com', 'My Name'); ... AddReplyTo('me@example.com', 'My Name'); , ( ) "me@example.com".

: , , , , ( ), .

: Coding Horror

: PHPMailer Tutorial ( )

( ) .

+5

, SMTP .

SMTP- (, , ), , , , .

Update: , gmail , gmail. .

+15

, , , . , , var $From = "someguy@whatever.com"; , , . Gmail , . , . : Gmail , gmail . , .

+2

" ", " (sic) "?

- ? , , .

, gmail, companyname@gmail.com, . .

, , , , , Constant Contact, .

, .

0

Sender:, From:, From, Sender From, - From , Sender

0

.

 var $From = "someguy@whatever.com";

, , . , IP. -, , , .

-3

Source: https://habr.com/ru/post/1781828/


All Articles