Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problem with FROM in PHP mail function

Discussion in 'E-mail Discussion' started by garak, Nov 22, 2004.

  1. garak

    garak Active Member

    Jan 23, 2004
    Likes Received:
    Trophy Points:
    Hello, a customer have a strange problem using a php form script.

    In the script headers, he have:

    $headers = "From: $name_rem <$email_rem>\nMime-Version: 1.0 \nContent-Type:
    text/html; charset=iso-8859-1";

    But, when he receives a form message, the FROM field appears in this way: when the correct is

    I'm using phpsuexec here....

    Any idea?
  2. dezignguy

    dezignguy Well-Known Member

    Sep 26, 2004
    Likes Received:
    Trophy Points:
    You need to add a line for the Return-Path: $email_rem... to do this:

    Look at the php docs, for mail()... I believe it's the 5th variable, is the one for return-path if you're using mail()... if you're using smtp, then you should be able to add "-f $email_rem" as a flag to your call to the mailserver binary.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice