0

I am not able to send email from any hosting containing link of my website https://www.gogglegator.com. Emails are working fine without this link and all other links in email are working fine.

When I tried phpmailer, I got error Mailer Error: SMTP Error: data not accepted.

Is there anybody who faced such issue ever and have possible troubleshooting steps? I am searching from three days but no success.

Thanks in advance for your time.

<?php 
require_once('class.phpmailer.php');
include("class.smtp.php");

//Create a new PHPMailer instance
$mail = new PHPMailer();

//Tell PHPMailer to use SMTP
$mail->isSMTP();
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 0;
//Ask for HTML-friendly debug output
$mail->Debugoutput = 'html';
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'ssl';
//Set the hostname of the mail server
$mail->Host = "smtp.mail.yahoo.com";
//Set the SMTP port number - likely to be 25, 465 or 587
$mail->Port = 465;
//Username to use for SMTP authentication
$mail->Username = "myaddress@yahoo.com";

//Password to use for SMTP authentication
$mail->Password = "mypass";
//Set who the message is to be sent from
$mail->setFrom('myaddress@yahoo.com', 'Test');
//Set an alternative reply-to address
$mail->addReplyTo('myaddress@yahoo.com', 'Test');
//Set who the message is to be sent to
$mail->addAddress('myaddress@yahoo.com');
//Set the subject line
$mail->Subject = "Test";
$mail->MsgHTML("https://www.gogglegator.com/");



if (!$mail->send()) {
     $message = "Mailer Error: " . $mail->ErrorInfo;
} else {
    $message = "Thank you for contacting us.";
}
echo $message; ?>
  • Also when I send this link (https://www.gogglegator.com) from gmail to gmail or yahoo, it goes. – Shahbaz Badar Feb 14 '15 at 08:12
  • possible duplicate of [phpmailer - The following SMTP Error: Data not accepted](http://stackoverflow.com/questions/15880042/phpmailer-the-following-smtp-error-data-not-accepted) – castis Feb 14 '15 at 08:18
  • Than please post the source where the message header and body are created and sent. – Lexib0y Feb 14 '15 at 13:26
  • My code works with any other link. This error only comes when I paste https://www.gogglegator.com. – Shahbaz Badar Feb 15 '15 at 10:15

0 Answers0