0
$transport = Swift_MailTransport::newInstance();
$messages1 = "
<!DOCTYPE>
<html>
    <body>
  Thank you for registering an account on www.satperfectscore.com
          <br>
Please use  <a href=".$mail.">this link</a> to verify your account.
<br>
After verification you will be entitled to 2 practice tests and 300 quiz questions.
   <body>
</html>";
$messages2 = "Use the URL to verify your account: ".$mail."";
$message = Swift_Message::newInstance();
$message->setContentType("text/plain");
$message->setTo($to);
$message->setSubject("Account Verification");
$message->setBody($messages2);
$message->addPart($messages1);
$message->setFrom(array("contact_us@satperfectscore.com"=> "SAT Perfect Score"));


$mailer = Swift_Mailer::newInstance($transport);
$mailer->send($message);

The message never reaches the recipient .. when I open cPanel's Email Trace I get the following error:

Event:  failure error    
User:   arasmus1   
Domain: satperfectscore.com    
Sender: contact_us@satperfectscore.com    
Sent Time:  Dec 13, 2014 8:33:20 PM    
Sender Host:    localhost    
Sender IP:  127.0.0.1    
Authentication: localuser    
Spam Score:     
Recipient:  yash1995.momyan@gmail.com    
Delivery User:     
Delivery Domain:        
Delivered To:      
Router: send_via_spamgateway   
Transport:  spamgateway_smtp   
Out Time:   Dec 13, 2014 8:33:20 PM   
ID: 1XzoDt-0006ZH-4J   
Delivery Host:  productio-tcloadba-tkyjfaz4ap1l-328615543.us-west-2.elb.amazonaws.com    
Delivery IP:    54.214.22.243    
Size:   1.56 KB

Result: 
SMTP error from remote mail server after end of data: host productio-tcloadba-tkyjfaz4ap1l-328615543.us-west-2.elb.amazonaws.com [54.214.22.243]: 550 5.7.1 [CS] Message blocked. To fix this, visit http://fp.outboundfiltering.com/?str=0001.0

what i'm doing wrong here? I am not even reaching the spam folder..

Rizier123
  • 58,877
  • 16
  • 101
  • 156
Yashashavi Ym
  • 19
  • 1
  • 6
  • the message has been blocked by the recipients own email server - it thinks its spam. This is probably more suited to [ServerFault](http://serverfault.com/) – Rhumborl Dec 13 '14 at 15:28
  • Did you read the error message? Did you visit the link? – tripleee Dec 13 '14 at 15:45
  • 1
    This question appears to be off-topic because it is about email deliverability, not about programming. – tripleee Dec 13 '14 at 15:46

1 Answers1

0

It's because your server's IP is blocked by the destination mail server. Your server's IP is on their black list so instead of moving your emails to spam folder, they simply ignore your emails.

To make sure you're blocked, try sending an email to a Gmail address.

As the error says, you can go to this link for unblocking your server: http://fp.outboundfiltering.com/?str=0001.0

Sky
  • 4,244
  • 7
  • 54
  • 83