Sending email via php - sends to one address but not another?? Cracking me up!

Status
Not open for further replies.

WhitePhantom

New Member
Hi,

This is really baffling me. I've created a php Contact Us form which, on submit, calls a page called contact.php. At the top of that page is a variable, $to. When $to is set to one of my email address, the info on the form is collected and emailed to me, no problem. When I set it to my client's email address, nothing arrives in the inbox.

I've checked, double-checked and triple-checked everything, and I just can't see what's wrong with it. The email address is correct, because I sent an email from my own email account, and it arrived 2 seconds later. It's just the php code that won't send it.

I'm new to php and this is my first form, but it all seems pretty straightforward. The only difference I can see is that my client's email address is a .ie, and mine are all .com. I can't see how that could possibly have any bearing on things, but just said I'd mention it...

Someone please help before I start crying!! :(

J.
 

mneylon

Administrator
Staff member
Have you checked the logs?
Have you tested it on your local machine?
 

ziycon

New Member
I doubt that its the email address that is causing the problem. Its possible that the email that your sending to has flagged the mail as junk/spam and either blocked it completely like hotmail is known to do or its going to a junk/spam folder.

Other possibility is the code your using to send the mail, can you post your code here for us to have a look at?
 

waynewex

New Member
I have a feeling that you're after messing up something in your code. When asking for help with code, you should always post your code from the get-go, even if you think you don't need to. It saves people the effort of asking you to post it and you'll probably find a solution a lot quicker.
 

louie

New Member
Use your own email address to send the email, but ad a header "Reply-To:" and put in there the sender email address...
 

WhitePhantom

New Member
Thanks for all the replies, sorry for the delay in getting back to you. The emails arrived in the other inbox - all together, all of a sudden. Some kind of delay, but I've no idea what or why. There doesn't seem to have been anything wrong, just that they arrived in my inbox straight away, but took a couple of hours before arriving to the other address.
 
Status
Not open for further replies.
Top