Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Mar 2007
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send email to hosted domain

    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!!

  • #2
    New Coder
    Join Date
    May 2009
    Location
    Glastonbury, UK
    Posts
    53
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Does sending to localhost work?

  • #3
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    That's a MTA configuration issue. Examine your maillogs to find out why mail to internally hosted domains is being rejected/dropped.

  • #4
    New Coder
    Join Date
    Mar 2007
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #5
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Quote Originally Posted by onmoon View Post
    Did I check the wrong file?
    Yes. maillog, (I believe that is the standard name used on Linux also).

  • #6
    New Coder
    Join Date
    Mar 2007
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #7
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Exactly how are you sending mail via PHP? Are you connecting directly to the Google servers and relaying outbound mail through their servers?

  • #8
    New Coder
    Join Date
    Mar 2007
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I downloaded a Class called htmlMimeMail5, link as below:
    http://www.phpguru.org/downloads/

    How you normally send email by PHP?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •