Page 1 of 1

Problems with email sending via PHP...

Posted: Tue Jun 14, 2005 4:08 am
by Mr Tech
Hey there,

I've set up a contact form on my clients website. The contact form is submitted to a PHP page containing this:

Code: Select all

<?php
$your_subject = "Message from your website's contact form";
$your_email = "info@seapen.net.au";
$inside_mail = "First Name: $fname
Last Name: $lname
Email Address: $email
Address: $address
Phone Number: $phone
Comments: $comments
";
 
@mail($your_email, $your_subject, $inside_mail, "From: \"$fname\"<$email>\r\nReply-To:  $email\r\nX-Sender:$fname using $email\r\nReturn-Path: $email");
 
header("location: ../contact_thanks.php");
?>

When I submit the form, the email does not go through into their inbox. I think their server is blocking it... I tested sending it to two of my email addresses and it worked just fine.

Any ideas as to why this is not working? Is theer a better script I could use to stop it from being blocked?

Thanks

Ben

Posted: Tue Jun 14, 2005 5:29 am
by shiznatix
maybe its being put in their junk mail folder, you gotta tweak your headers to make it accesable for diffrent accounts like hotmail and yahoo and whatnot

Posted: Tue Jun 14, 2005 5:35 am
by Mr Tech
I don't think they have a Junk folder... it's being received in Outlook Express.

Posted: Tue Jun 14, 2005 6:20 am
by timvw
The only thing you can do is ask their sysadmin to allow e-mails coming from you.. But i don't think she will do that...

Posted: Tue Jun 14, 2005 7:07 am
by Syranide
Note: mails coming from a SMTP server on a dynamic IP range are very commonly blocked by major mailservices as these are commonly spam, if you are using such that could be the problem, try using your assigned one if you have one or find a free one on the net. (if so)