so I have this script and I've been trying to figure out why it won't send to my Yahoo email account.
<?php
require 'Exception.php';
require 'PHPMailer.php';
require 'SMTP.php';
require 'autoload.php';
//PHPMailer Object
$mail = new PHPMailer(true);
$mail->SMTPDebug = 2;
$mail->Host = "[email protected]";
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "~~~";
$mail->SMTPSecure = "SSL";
$mail->Port = 465;
$mail->From = "[email protected]";
$mail->FromName = "Tampa Bay Downs";
$mail->addAddress("[email protected]", "Austin");
$mail->Subject = 'PHPMailer GMail SMTP test';
$mail->Body = 'This is a plain text';
try {
$mail->send();
echo "Message has been sent successfully";
} catch (Exception $e) {
echo "Mailer Error: " . $mail->ErrorInfo;
}
?>
When I load the script page it says sent successfully but on the server, the email bounces back with this
[email protected]
host mta6.am0.yahoodns.net [67.195.~~]
SMTP error from remote mail server after pipelined MAIL FROM:<[email protected]> SIZE=1759:
553 5.7.2 [TSS09] All messages from 217.~~ will be permanently deferred; Retrying will NOT succeed. See https://postmaster.verizonmedia.com/error-codes
I am unsure why this isn't working. When I replace my yahoo email with my gmail, it sends and my gmail gets the email from the server. Is there something different that has to be done with Yahoo?
My Yahoo email isn't blocking any incoming email addresses and it isn't in my spam.
I added ~~~ to the secure information, that is why that is there.
Can someone please help, I've been trying to figure this out for the past 3 hours :( :(
The IP address of your provider's email server is blocked by yahoo. Use another server or service to relay your messages. As you pointed out gmail is relaying your messages correctly.
You can also ask your email admin to try fix it for you, but Yahoo is difficult to deal with on this kind of errors.