The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cannot send mails using php mail() function to domain with remote mail exchanger

Discussion in 'E-mail Discussions' started by m.ioannidis, Feb 19, 2014.

  1. m.ioannidis

    m.ioannidis Registered

    Joined:
    Feb 19, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello every one!

    I'm facing a weird problem.
    On a dedicated server I have WHM 11.40.1 (build 11).
    PHP 5.4.23

    I have an account set up lets say domain.com.
    In its DNS zones, I have insert the necessary records for the hotmail MX records AND the Remote Mail Exchanger option on.
    I 'm trying to send an email using mail('info@domain.gr', 'Test from Script', 'Test Text');

    It should go to the hotmail servers. Right?

    I get no errors in exim_mainlog.

    Code:
    
    2014-02-19 18:16:15 1WG9ol-0000Gk-46 <= domain@my.server.com U=domain P=local S=371 T="Test from script" for info@domain.com
    2014-02-19 18:16:15 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1WG9ol-0000Gk-46
    2014-02-19 18:16:15 cwd=/home/domain/public_html 3 args: /usr/sbin/sendmail -t -i
    2014-02-19 18:16:15 1WG9ol-0000Gk-46 => domain <info@domain.com> R=localuser T=local_delivery
    2014-02-19 18:16:15 1WG9ol-0000Gk-46 Completed
    
    
    The Mail Queue is empty.

    The domain.com is NOT in /etc/localdomains and is ON the /etc/remotedomains.

    If i dig MX domain.com, I get the lowest MX record pointing to <blah blah blah>.pamx1.hotmail.com. as expected.

    But still no mail in hotmail accounts.

    And now the weird staff:

    If i run the php script through shell (root) access, the mail goes to hotmail account.

    If I create a local mail account (info@domain.com) and log in into it (via domain.com/webmail), I can see the message from the php script!

    Any help would be great!

    Thank you in advance.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,707
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. m.ioannidis

    m.ioannidis Registered

    Joined:
    Feb 19, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for the response!

    Sending with SMTP is not an option at the moment.
    The site was before working fine from an other server of mine. Since the transfer, the mail() function seems to have that issue.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,707
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page