Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cannot send mail to mail.com and yahoo.com #2833

Closed
oresteafrica opened this issue Nov 24, 2022 · 2 comments
Closed

I cannot send mail to mail.com and yahoo.com #2833

oresteafrica opened this issue Nov 24, 2022 · 2 comments

Comments

@oresteafrica
Copy link

oresteafrica commented Nov 24, 2022

I have read carefully issue 348 with same issue, did all suggested actions, but no way to send email to mail.com and yahoo.com, while my usual address on my domain is receiving the email sent by PHPMailer.
My code is the following, maybe something is out of my view:

$mail = new PHPMailer;
$mail->AddCustomHeader("X-MSMail-Priority: High");
$mail->Priority = 1;
$mail->CharSet = 'UTF-8';
$mail->isSMTP(); 
$mail->SMTPDebug = 2;
$mail->Host = 'myhost';
$mail->Port = '587';
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->Username = 'my username';
$mail->Password = 'my pass';
$mail->isHTML(true);
$mail->setFrom('my domain email address', 'my domain name');
$mail->addAddress('[email protected]', 'xxx');
$mail->addAddress('[email protected]', 'yyy');
$mail->addAddress('my usual address', 'me');
$mail->AddReplyTo('my domain email address', 'my domain name');
$mail->Subject = 'PHPmailer test';
$mail->Body    =  $msg;
$mail->AltBody = 'HTML not supported';
if ($mail->send()) {
    echo 'Message has been sent'."\n";
} else {
    echo 'Message could not be sent.'."\n";
}

the answer from debug:

2022-11-24 06:35:26	SERVER -> CLIENT: aaa.bbb.com ESMTP Exim 4.95 #2 Wed, 23 Nov 2022 22:35:26 -0800 
                   	                  220-We do not authorize the use of this system to transport unsolicited, 
                   	                  220 and/or bulk e-mail.
2022-11-24 06:35:26	CLIENT -> SERVER: EHLO raspberrypi
2022-11-24 06:35:26	SERVER -> CLIENT: aaa.bbb.com Hello raspberrypi [160.119.158.29]
                   	                  250-SIZE 52428800
                   	                  250-8BITMIME
                   	                  250-PIPELINING
                   	                  250-PIPE_CONNECT
                   	                  250-AUTH PLAIN LOGIN
                   	                  250-STARTTLS
                   	                  250 HELP
2022-11-24 06:35:26	CLIENT -> SERVER: STARTTLS
2022-11-24 06:35:26	SERVER -> CLIENT: 220 TLS go ahead
2022-11-24 06:35:27	CLIENT -> SERVER: EHLO raspberrypi
2022-11-24 06:35:27	SERVER -> CLIENT: aaa.bbb.com Hello raspberrypi [160.119.158.29]
                   	                  250-SIZE 52428800
                   	                  250-8BITMIME
                   	                  250-PIPELINING
                   	                  250-PIPE_CONNECT
                   	                  250-AUTH PLAIN LOGIN
                   	                  250 HELP
2022-11-24 06:35:27	CLIENT -> SERVER: AUTH LOGIN
2022-11-24 06:35:28	SERVER -> CLIENT: 334 VXNlcm5hbWU6
2022-11-24 06:35:28	CLIENT -> SERVER: [credentials hidden]
2022-11-24 06:35:28	SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2022-11-24 06:35:28	CLIENT -> SERVER: [credentials hidden]
2022-11-24 06:35:28	SERVER -> CLIENT: 235 Authentication succeeded
2022-11-24 06:35:28	CLIENT -> SERVER: MAIL FROM:<[email protected]>
2022-11-24 06:35:29	SERVER -> CLIENT: 250 OK
2022-11-24 06:35:29	CLIENT -> SERVER: RCPT TO:<[email protected]>
2022-11-24 06:35:29	SERVER -> CLIENT: 250 Accepted
2022-11-24 06:35:29	CLIENT -> SERVER: RCPT TO:<[email protected]>
2022-11-24 06:35:29	SERVER -> CLIENT: 250 Accepted
2022-11-24 06:35:29	CLIENT -> SERVER: RCPT TO:<[email protected]>
2022-11-24 06:35:30	SERVER -> CLIENT: 250 Accepted
2022-11-24 06:35:30	CLIENT -> SERVER: DATA
2022-11-24 06:35:30	SERVER -> CLIENT: 354 Enter message, ending with "." on a line by itself
2022-11-24 06:35:30	CLIENT -> SERVER: Date: Thu, 24 Nov 2022 07:35:25 +0100
2022-11-24 06:35:30	CLIENT -> SERVER: To: Oreste <[email protected]>, Oreste <[email protected]>, Oreste <[email protected]>
2022-11-24 06:35:30	CLIENT -> SERVER: From: allerta <[email protected]>
2022-11-24 06:35:30	CLIENT -> SERVER: Reply-To: allerta <[email protected]>
2022-11-24 06:35:30	CLIENT -> SERVER: Subject: PHPmailer test
2022-11-24 06:35:30	CLIENT -> SERVER: Message-ID: <khTwyqQYry11dwfkI5ODzHD7GFsqRnyzcrIkDfunFiU@raspberrypi>
2022-11-24 06:35:30	CLIENT -> SERVER: X-Priority: 1
2022-11-24 06:35:30	CLIENT -> SERVER: X-Mailer: PHPMailer 6.6.5 (https://github.com/PHPMailer/PHPMailer)
2022-11-24 06:35:30	CLIENT -> SERVER: X-MSMail-Priority: High
2022-11-24 06:35:30	CLIENT -> SERVER: MIME-Version: 1.0
2022-11-24 06:35:30	CLIENT -> SERVER: Content-Type: multipart/alternative;
2022-11-24 06:35:30	CLIENT -> SERVER:  boundary="b1_khTwyqQYry11dwfkI5ODzHD7GFsqRnyzcrIkDfunFiU"
2022-11-24 06:35:30	CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
2022-11-24 06:35:30	CLIENT -> SERVER:
2022-11-24 06:35:30	CLIENT -> SERVER: This is a multi-part message in MIME format.
2022-11-24 06:35:30	CLIENT -> SERVER:
2022-11-24 06:35:30	CLIENT -> SERVER: --b1_khTwyqQYry11dwfkI5ODzHD7GFsqRnyzcrIkDfunFiU
2022-11-24 06:35:30	CLIENT -> SERVER: Content-Type: text/plain; charset=us-ascii
2022-11-24 06:35:30	CLIENT -> SERVER:
2022-11-24 06:35:30	CLIENT -> SERVER: HTML not supported
2022-11-24 06:35:30	CLIENT -> SERVER:
2022-11-24 06:35:30	CLIENT -> SERVER: --b1_khTwyqQYry11dwfkI5ODzHD7GFsqRnyzcrIkDfunFiU
2022-11-24 06:35:30	CLIENT -> SERVER: Content-Type: text/html; charset=UTF-8
2022-11-24 06:35:30	CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
2022-11-24 06:35:30	CLIENT -> SERVER:
2022-11-24 06:35:30	CLIENT -> SERVER: <hr />16422<hr /><p style="font-size:x-small;">
2022-11-24 06:35:30	CLIENT -> SERVER: This message is sent from ddd<br /><br />
2022-11-24 06:35:30	CLIENT -> SERVER: </p>
2022-11-24 06:35:30	CLIENT -> SERVER:
2022-11-24 06:35:30	CLIENT -> SERVER:
2022-11-24 06:35:30	CLIENT -> SERVER: --b1_khTwyqQYry11dwfkI5ODzHD7GFsqRnyzcrIkDfunFiU--
2022-11-24 06:35:30	CLIENT -> SERVER:
2022-11-24 06:35:30	CLIENT -> SERVER: .
2022-11-24 06:35:31	SERVER -> CLIENT: 250 OK id=1oy5pa-0004Oz-Eu
2022-11-24 06:35:31	CLIENT -> SERVER: QUIT
2022-11-24 06:35:32	SERVER -> CLIENT: 221 aaa.bbb.com closing connection
Message has been sent
@Synchro
Copy link
Member

Synchro commented Nov 24, 2022

Your code is fine, and the transcript shows a successful delivery to your mail server, so PHPMailer's involvement ends here. What you need to look at next is your mail server's logs (grepping your logs for the ID mentioned on the 250 OK line might prove interesting)) to find out what happens to your messages after that.

@Synchro Synchro closed this as completed Nov 24, 2022
@oresteafrica
Copy link
Author

Thanks for your answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants