View Full Version : Send email to hosted domain

03-15-2010, 10:54 PM
I have a dedicated server, which hosts serveral domains. Sometimes, we need to have an online form so that our visitors can send their comments directly to our email inbox. However, I found that the email sending PHP script can only send emails to domains which are not hosted within the same server as the scripts'.

It definitely can be solved, because I know some hosting can do this. Anyone knows how to make it? Thanks!!

03-16-2010, 08:32 AM
Does sending to localhost work?

03-16-2010, 06:12 PM
That's a MTA configuration issue. Examine your maillogs to find out why mail to internally hosted domains is being rejected/dropped.

03-17-2010, 11:39 AM
My OS is Centos 5.3. and I checked the logs files (messages and secure) which are located at /var/log
but none of them mentioned the email sending status, successfully or not.

Did I check the wrong file?

03-17-2010, 11:57 AM
Did I check the wrong file?

Yes. maillog, (I believe that is the standard name used on Linux also).

03-17-2010, 03:08 PM
err...I don't have maillog under /var/log

Probably because I point MX to google? little bit complicated. I hosted domain (say, mydomain.com) at my server, but I changed domain's DNS so that I can use google's email service.

Thus, when I use PHP (within mydomain.com) to send email to xxx@mydomain.com, I got nothing. If I send email to xxx@otherdomains.com, I can receive it.

Any thought?

03-17-2010, 06:53 PM
Exactly how are you sending mail via PHP? Are you connecting directly to the Google servers and relaying outbound mail through their servers?

03-19-2010, 10:47 AM
I downloaded a Class called htmlMimeMail5, link as below:

How you normally send email by PHP?