Bluemagica
Bluemagica

Reputation: 5158

Mail being sent to gmail, yahoo, but not to personal mail servers

I am facing a weird problem. When I send out mails using PHP's mail() function, the mail is being sent perfectly to gmail and yahoo(though it was marked as spam in yahoo), but the mail is not received by my company's email address.

I don't have direct access to the server, only ftp to the public_html folder, hence I can't check the logs.....

Any ideas or suggestions?

EDIT:

$mailfrom="[email protected]";
                            $mailto=$buyerrow['email'];
                            $subject="Test Details";
                            $body='Hi '.$buyerrow['name'].'!<br>Test Details below:<br><br><br><br><br>Thanks<br>Web Team';
                            $headers  = "MIME-Version: 1.0\r\n";    
                            $headers.= "Content-type: text/html; carset=iso-8859-1;\r\n";   
                            $headers.= "From: ADMIN <".$mailfrom.">\r\n";
                            @mail($mailto,$subject,$body,$headers,"-f [email protected]");

As for the spam folders at my company's server, I am quite sure it didn't end up there either....

Is it possible that there is some server setting which allows php to send mail to only particular server?

Upvotes: 0

Views: 1358

Answers (3)

0xAli
0xAli

Reputation: 1059

The problem seems to be with your company's server mail server.

Make sure to test it [send email from yahoo to your company email address] and double check the mx records.

Upvotes: 0

Sander Marechal
Sander Marechal

Reputation: 23216

Many company mailservers are set up to outright reject some types of spam immediately during the SMTP session. If that happens, it will never make it to your companies spam folder. You should check with your company system administrator.

If you're in doubt, you can always use an application like Wireshark to capture and analyse the actual SMTP traffic.

Upvotes: 1

Loganathan Natarajan
Loganathan Natarajan

Reputation: 340

Have you checked on the Spam folder ? also check whether you have set HEADERS properly with from name etc.,

Upvotes: 0

Related Questions