LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-10-2006, 08:46 PM   #1
purefan
Member
 
Registered: Aug 2003
Location: Sweden
Distribution: Ubuntu 10.04
Posts: 99

Rep: Reputation: Disabled
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
 
Old 02-11-2006, 04:30 PM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
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.
 
Old 02-13-2006, 03:04 AM   #3
smallville
Member
 
Registered: Dec 2005
Posts: 44

Rep: Reputation: 15
Sendmail - assigning FROM

add this line in your php script:


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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Set up an email server? neocookie Linux - General 3 08-15-2005 02:20 PM
sendmail set up for email accounts banner Linux - General 1 07-05-2005 08:19 AM
Help me set up an email server bad_andy Linux - Newbie 4 01-04-2005 07:56 AM
Set Up Email Kavey Linux - Software 1 08-02-2004 09:19 PM
Having ISSUES with email set up. jimmytango829 Linux - Software 2 07-21-2004 12:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration