Problems sending emails from code to own domain

evyatron

New member
Joined
Dec 14, 2010
Messages
2
Hello

I'm hosting a domain, let's say "foo.com".
I have a contact form which sends a plain text email via PHP:

$response = mail("[email protected]", "Contact from website", $email);

the response I get is always TRUE, but the email never reaches "[email protected]". things I've tried:
  • Sending an email from my gmail account to "[email protected]"- the email is received correctly.
  • Send an HTML email- still not getting it.
  • Send the email from the PHP file to my personal gmail account- the mail is received correctly.
  • Send the email from the PHp file to a different @foo.com email- email still not received.

It seems like there's a problem sending to my own domain via code.
What gives?


Thanks,
Evyatar.
 
did you send this to me because I missed something in my code?

I know how to send emails using the mail function, and I've been doing it for a few years now. The problem I have is very specific for this site and doesn't happen anywhere else.


Thanks.
 
Is mail for the site set up on the same server where you host the site, or on a different server? If a different server then check for MX Records setting in your user login for the site.

If you don't see the MX Records setting you may need to turn on DNS control in your site at the reseller level, and possibly for the reseller at the admin level.

If the server isn't yours, and you don't have these settings, then you'll need to contact your hosting provider.

Jeff
 
Back
Top