Connecting Tech Pros Worldwide Forums | Help | Site Map

Why am I not able to receive email on mydomain.com when I am able to send emails?

kamill's Avatar
Member
 
Join Date: Dec 2006
Location: within compiler
Posts: 65
#1: Oct 17 '08
Dear Friends,

I am using a php mail function, with this script i am sending mail to customer of my client. Script id doing well with other domain but with same domain emails script is unable to send mail.

example:

my domain name where i am running script is www.example.com
and i have two email ids as xyz@example.com and xyz@abc.com then i am able to receive email at xyz@abc.com but not able to receive mail at xyz@example.com.

[PHP]<?php
$from='test@example.com';
$headers = "From: $from";
$headers = "Content-type: text/html; charset=iso-8859-1\r\n"; $to1='xyz@example.com';
$to2='xyz@abc.com';
$subject='Test Subject';
$msg='Test Message';
mail($to1, $subject, $msg, "From:$from\n".$headers);
mail($to2, $subject, $msg, "From:$from\n".$headers);
?>
[/PHP]


I have got stuck with it. Please help me.

dlite922's Avatar
Expert
 
Join Date: Dec 2007
Location: Moon, Dark Side
Posts: 1,095
#2: Nov 1 '08

re: Why am I not able to receive email on mydomain.com when I am able to send emails?


This may not be a PHP problem but your mail server.

telnet to your mail server on port 25 (SMTP) and send an email through the command line.

check Google for SMTP commands and examples of how to do that.



Dan
Reply