Forum Moderators: phranque

Message Too Old, No Replies

Emails not getting through from contact form

         

surrealillusions

10:10 am on Aug 6, 2010 (gmt 0)

10+ Year Member



Hi all,

Have a strange problem with an online contact form.

Its written in PHP, and it works fine - except for the emails coming through the other end for one email address.

domain is www.example.com
Originally, emails would appear to be sent from the user who filed the form out. I thought perhaps that this could be picked up as spam, so I changed it to noreply@example.com but still nothing.

If I set the form to send to my email address - it comes through within seconds, no problems, but it doesn't appear at the other end when set to send to info@example.com, which is their original email address and has been used for quite sometime.

They've checked their junk folders and its not in there.

I have no access to the server or any log files, although I am going to contact their host to see if they can see anything.

What could possibly be going wrong and is there any way of checking it?

creative craig

10:25 am on Aug 6, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I recently had a very similar issue with a site of my own - in the end it was a problem with the host and they had to fix it themselves.

lammert

10:27 am on Aug 6, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It may be either the SMTP server on the webserver, or an in-between SMTP server which doesn't allow mail relaying unless the sender address is from a specific domain. This is something the hosting company would be able to check. If something else is happening server side they should be also able to identify it in the logfiles.

londrum

10:34 am on Aug 6, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i had this problem once too, and it turned out to be my host's draconian spam filters. trying to send an email from your domain whilst appearing to send it from the user's email address (which is innocent enough, because you want the return address to be the user's) messed everything up.

i fixed it with this

ini_set("sendmail_from", "example@yourdomain.com");


mail("example@yourdomain.com", "Title", "Message", "From: Username<Useremailaddress>\r\n"."Reply-To: Username<Useremailaddress>\r\n"."X-Mailer: php", "-f example@yourdomain.com");


obviously 'Title', 'Message', 'Username' and 'Useremailaddress' have to be swapped out for the correct values.

Status_203

7:56 am on Aug 9, 2010 (gmt 0)

10+ Year Member



I had problems with my tell-a-friend script and SPF. The solution (I believe, on checking my years old code - so it's bears confirming) was in the email headers to set Return-Path: and Sender: to an email address from my server (to validate the SPF) and the From: as the person initiating the email.

Mark_A

12:44 pm on Aug 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



On an old form I used to use you used to have to list permitted email addresses and permitted domains in the code on the server or the email would just fail.