Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
We are using Swift mailer to send emails to our customers from our site. The biggest problem we are facing is that emails to certain domains are NOT sent. There is no bounce back received and neither is the mail sent to the SPAM folder of the customer. The email just disappears!!! It is sent from our end but is never delivered to the customer.
Emails to Gmail, yahoo, hotmail are sent and received successfully, but emails to AOL domains fail!
We tried sending emails to AOL domain by logging through our web-client and they are sent successfully. But emails sent through swift mailer are never received Hence this is a code problem
What can be the issue? There may be thousands of domains out there, and we are losing out on customers who are unable to register on our site How can i make sure that email is always sent? What changes do we need to make in code?
Pleeeeeeeeeeeez help, this has become a very critical problem on our site
Both mails with and without attachment are NOT sent to AOL. See code snippet below.Code: Select all
$smtp =& new Swift_Connection_SMTP("localhost",25);
$smtp->setTimeout( 100 );
$swift =& new Swift( $smtp );
$text_body1 = "Mr/Mrs " . $name . ", \n\n";
$text_body1 .= "has booked a table through Tastykhana.com, make sure the booking process is completed \n\n";
$text_body1 .= "Team TastyKhana.com";
$text_body2 = "Dear $name \n\n";
$text_body2 .= "Thank you for using TastyKhana's table reservation service. Your reservation will be confirmed by one of our executives very soon. \n\n";;
$text_body2 .= "Please refer to the PDF document attached with this email for your order details. For easy identification it would be helpful if you carry along a print of this reservation. \n\n";
$text_body2 .= "Please note any changes to be made in the reservation can be done by latest 1 hour prior to the booking time. Incase of unavailibilty the restaurant may cancel the booking. \n\n";
$text_body2 .= "Please contact us for any further queries. \n\n";
$text_body2 .= "Thank you. \n";
$text_body2 .= "www.tastykhana.com \n";
$text_body2 .= "Restaurant Reviews, Table Reservation, Online Ordering and much more...";
$message =& new Swift_Message("TastyKhana.com table booking");
$message->attach( new Swift_Message_Part("{message}"));
//Specify the list of replacements as a 2-d array
$replacements = array(
$TKBOOKING_EMAIL => array("{message}" => $text_body1),
$email => array("{message}" => $text_body2)
);
//Load the plugin with these replacements
$swift->attachPlugin(new Swift_Plugin_Decorator($replacements), "decorator");
$message->attach(new Swift_Message_Attachment(new Swift_File($path), $serviceCode.".pdf", "application/pdf"));
$sender =& new Swift_Address($TKBOOKING_EMAIL, "Tastykhana Bookings");
$receiver1 = new Swift_Address($TKBOOKING_EMAIL, "");
if (!$swift->send($message, $receiver1 , $sender)) {
$errorMessage = "There has been an error sending mail <br>" .
" Please check whether your internet connection is still active";
}feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]