LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   PHP: set the FROM to an email (https://www.linuxquestions.org/questions/programming-9/php-set-the-from-to-an-email-414006/)

purefan 02-10-2006 08:46 PM

PHP: set the FROM to an email
 
hi guys!

im writting a script in PHP and I found out that the mail function does not allow the sendmail_from unless from windows. But I need to set the FROM field in every email and I dont know how...
Im also a bit confused about this whole mailing thing from linux, for what's worth I have succesfully installed Qmail.

Any help will be greatly appreciated :)

graemef 02-11-2006 04:30 PM

The from is set in the ini file but I believe that as part of the 4th (optional) parameter you can send additional headers that can include Reply-TO information.

smallville 02-13-2006 03:04 AM

Sendmail - assigning FROM
 
add this line in your php script:


$headers .= "From: Whatever Name <name@email.com>\r\n";


All times are GMT -5. The time now is 12:08 AM.