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.