Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    dkz
    dkz is offline
    Member
    Join Date
    Sep 2004
    Posts
    100

    Default How To Have PHP Scripts Being Sent From The Correct User...

    Hello,

    I have been having problems sending emails via php scripts and looking further into the promlem I see all php emails are being sent from USERNAME@servername.com instead of email_name@domain_name.com. Does that make sense? My PHP script includes the from, reply-to and return-path in the headers. I also tried ini_set(sendmail_from, "email@addr.com"); in the script and a couple of other fixes but nothing works. I'm using php 5.04, sendmail and phpsuexec is enabled.

    Thanks for any suggestions!

  2. #2
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Add just one additional parameter to the PHP mail() command ...

    "-f username@domainname.com"

  3. #3
    dkz
    dkz is offline
    Member
    Join Date
    Sep 2004
    Posts
    100

    Default

    Thank you - Thank you - Thank you!


    That did the trick!

    Thank you!

Similar Threads & Tags
Similar threads

  1. Php scripts send mail as user@servername.com
    By cwalke32477 in forum New User Questions
    Replies: 3
    Last Post: 01-10-2011, 07:39 AM
  2. Are you running as the correct user? (Tripwire,Spamassassin)
    By sebby in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-05-2007, 04:30 PM
  3. Correct way to enable PHP SuExec
    By Daniel15 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-06-2006, 09:20 AM
  4. IMAP Broken, Firewall Not Blocking Port, User/Pass Correct
    By Xyrael in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-05-2006, 03:39 PM
  5. making sure php has correct permissions
    By EMS in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-30-2003, 02:50 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube