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.

nobody@host sender/reply to issue with php

Discussion in 'General Discussion' started by jeroman8, Jul 14, 2008.

  1. jeroman8

    jeroman8 Well-Known Member

    Mar 14, 2003
    Likes Received:
    Trophy Points:
    Is it correct to say that if you are running a newsletter and using php mail() in the script to send the mail, you will not receive the errors during SMTP session cause it goes to nobody@host instead of sender address.

    When sending mail with php mail() the sender address is the nobody@host
    address when the mail servers talk to each other at STMP time.
    So errors/bounches is not being delivered back to the correct sender, it
    goes to nobody@host ... (no such user etc messages)
    But - after smtp time, if I should reply to a message, it goes to the
    correct reply to/sender address.

    Sometimes, maybe it has to do with how php is run, the reply goes
    to and not to nobody.
    But anyhow - it does not go to the reply to address.

    If I instead use SMTP for my mail script, instead of php mail(), eveything
    is fine and all bounches is going to sender/reply to address.
    But most of the scripts use php mail() or sendmail from start.

    I hope you understand what I mean ...
  2. cPDan

    cPDan cPanel Staff
    Staff Member

    Mar 9, 2004
    Likes Received:
    Trophy Points:
    Correct, a proper SMTP session is the way to go for fine grained control.

    PHP's mail() is pretty lame and goes with PHP's motto "as long as it works its working, when it fails who knows"

    That said you could craft headers in the convoluted way PHP does everythgin but since "nobody" is doing it it can appear as spoofed and other clients/servers may reject it.

    Either way a proper authenticated SMTP session is the best way to send mail from scripts.
Similar Threads - nobody@host sender reply
  1. hamed5034

Share This Page