0

I am trying to send mail using swiftmailer.but no mail receive my client which is send from my system.I am using mini relay as my smtp server to send mail. here is my code

<?php
 require_once 'lib/swift_required.php';
 $transport = Swift_SmtpTransport::newInstance('***.**.*.***',25);
 $mailer = Swift_Mailer::newInstance($transport);
 $message = Swift_Message::newInstance();
 $message->setSubject($subject);
 $message->setFrom($headers);
 $message->setBody($mail_body);
 try{
  $message->setTo($value);
  $result = $mailer->send($message);
  echo $message-> toString();
  if($result){
    echo '<script type="text/javascript">alert("Tagged Person Notified Successfully");</script>';
  }
}catch (Swift_RfcComplianceException $e){
  echo '<script type="text/javascript">alert("Email address not valid:"'.$e->getMessage().');</script>';
  echo("<script>window.location = 'post.php?post_id=$post_id&cat_id=$cat_id';</script>");
}
?>

When i send mail i'll get this alert :

echo '<script type="text/javascript">alert("Tagged Person Notified Successfully");</script>';

and return this massage from mailer.

Message-ID: <6ee5bd8846854bc9f39ee03b0cb31e9d@localhost> Date: Thu, 28 Aug 2014 12:55:50 +0600 Subject: Date/Time Functions From: dipak_chakraborty@mydomain.com To: dipokchakraborty@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable http://*****:80/post.php?post_id=3D5&cat_id=3D60cebd108a640851d20731= 14066335d1

Now, problem is no mail receive im client email account. i am using a valid email address as sender.

Any solution please.

  • I need solution about this issue. already spent 5 days about this problem – Dipok Chakraborty Aug 31 '14 at 08:48
  • We help each other. We do not **demand** solutions because you didn't pay anyone here so don't behave like that. Has it ever occurred to you that your "client" has spam filters and filters your mail? Have you ever sent that mail to several different accounts to confirm it actually goes through? You are using valid **sender** but never mentioned if the **receiver** is valid too. There's just too many holes in your "debugging" approach. Please hire an expert who can solve this for you, you haven't provided nearly enough information and this isn't a coding problem at all. – N.B. Aug 31 '14 at 09:04

0 Answers0