Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- PHP Mail problems
June 8, 2007, 11:07 am
rate this thread
I've just implemented a php mail script on a clients website to allow
visitors to send him emails via his site, but it's behaving oddly.
If I configure the script to send to his email@example.com (where
hisdomain.com is also the domain where the script is hosted) the emails just
don't get through.
But if I configure the script to send to another email address, say my own,
the emails come through perfectly.
Could this be some sort of security measure his hosts have implemented to
block emails who's "to address" is set to match the domain or IP from which
it was sent?
If so, is there anything I can realistically do to rectify the situation?
The method I'm using relies on a form sending information to a page titled
"sendmail.php", which contains the following code.
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "firstname.lastname@example.org", "Enquiry from Hisdomain website.",
$message, "From: $email" );
header( "Location: http://www.hisdomain.com/dev1/thankyou.htm " );
Re: PHP Mail problems
Fat Sam wrote:
It's possible, but there are a lot of other possibilities, also. Without
the sendmail log, you really don't know why it was rejected.
And BTW - your script is very insecure. There is no sanitation of the
From: address. IT would be very easy to add additional headers, i.e.
BCC: to the From: field.
Remove the "x" from my email address
JDS Computer Training Corp.
- » Looking for Effective Copywriting advice site - ('persuasion world expert' etc)
- — Next thread in » Webmaster Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum