PEAR mail not sending to .eu email addresses
Posted
by andy-score
on Stack Overflow
See other posts from Stack Overflow
or by andy-score
Published on 2010-06-09T09:59:35Z
Indexed on
2010/06/09
10:02 UTC
Read the original article
Hit count: 307
I have a PEAR mailing script that is used to send newsletters from a clients website. I've used the same code before to produce another newsletter system and it has worked well and been used to send emails to various addresses, however our latest client has email addresses ending .eu and this seems to cause a problem.
When the newsletter is sent from the site to the various subscribers, including gmail, hotmail, yahoo and our own company emails, the emails are received correctly by all but the clients email addresses, the ones ending in .eu. As there is nothing different between their mailing system and our own, which is run from the same hosting company, I have to conclude that it is something to do with the domain name.
The emails are being sent to the addresses from the system, as I have a log file storing the email addresses when the mail out function is called, but the newsletter never appears in the inbox. I have created a new email account for the domain and that too isn't receiving the emails. It's not going into a spam folder as the webmail system marks spam by adding SPAM into the subject.
I've tried to log if there are any errors using the following
foreach($subscribers as $recipient)
{
$send_newsletter = $mail->send($recipient, $headers, $body);
// LOG INFO
$message = $recipient;
if($send_newsletter)
{
$message .= ' SENT';
}
elseif(PEAR::isError($send_newsletter))
{
$message .= ' ERROR: '.$send_newsletter->getMessage();
}
$message .= ' | ';
fwrite($log_file,$message);
}
However this simple returns SENT for all recipients, so in theory there isn't anything wrong with the mailing function.
I don't know a great deal about PEAR or the mailing function so I may be missing something important, but I'd have thought seeing the last thing to happen is sending the email out, and that seems to work, then it should reach the clients inbox.
Is this something to do with the PEAR mailing function not liking .eu addresses or is it more likely to be something wrong in my code or with their domain?
Any help is greatly appreciated as the client and myself are getting both confused and frustrated by the whole thing.
Cheers
© Stack Overflow or respective owner