Page 1 of 1

Emails sent from shared server going lost (sendmail). HELP!!

Posted: Fri May 05, 2006 9:44 am
by maxb
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]


Hello.  I really need help with some problem I am experiencing with my
website.

This is an Online Shop site, and I've designed the backend so that I
can see a list of open orders, and after I've processed them on the
online terminal of the merchant site, I can click "Reject" on an
order's related button so to 1) Update an SQL db the Order Status as
Rejected, and 2) use a php script (using sendmail) to send an email to
the customer of that his card was rejected; there's also a button to
accept a transaction that does similar things, and a button to accept
all shown transactions.

Now, my site is using a shared email server, and the problem I am
experiencing is that several customers don't seem to receive this
automated emails, and keep querying me about their order status,
especially AOL users but not only.  I cotacted AOL about it and they
said it was because, being a shared server, the sender IP address does
not correspont to the domain in the email headers, using DNS. (the
email server being  http://www.outitgoes.com).  (I suppose they classify it as
spam)

This is the part of transreject.php that sends the email.

$email is the customer's email
$domain is the site's address
$webname is the site's name

Code: Select all

# Email Customer
$to = $email;
$from = "orders@".$domain;
$subject = "Your card has been declined";
$mailbody = "Your card has been declined<BR><BR>Order Number:
".$OrderNumber."<BR><BR>";
$mailbody .= "You may want to check that you entered your credit card
number correctly.<BR><BR>".
             "<BR><BR><A HREF='www.". $webname .".co.uk'>" .$webname
."</A><BR><A HREF='mailto:". $from ."'>". $from ."</A>";

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= "From: ". $webname ." <".$from.">\r\n";
$headers .= "Reply-To: ".$from."\r\n";
$headers .= "Bcc: bcc@". $domain ."\r\n";
$mailforms = mail($to, $subject, $mailbody, $headers);
The whole page is available to see if you need.

Please, I need some advice on how to sort this problem. I can't afford
to have any further missing emails.


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]

Posted: Fri May 05, 2006 10:51 am
by s.dot
AOL is really picky about what they accept. Others regard mail with improper headers will be treated as spam.

As for AOL, I can almost guarantee your reverse dns doesn't propagate properly. Do a lookup on your domain.

http://www.dnsreport.com