"Amanda McComb" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If I am using this code: > > mail("[EMAIL PROTECTED]", "test", "testbody"); > > and want to add a From: line, how do I do it? > > Also, is this an excepted way of sending mail from a web page? > > Thanks, > Amanda
The mail() function has two optional inputs. Additional Headers and Additional Parameters. FROM and other optional headers can be set up like this.. $headers = "From: [EMAIL PROTECTED]"; $headers .= "Cc: [EMAIL PROTECTED]"; $headers .= "Reply-To: [EMAIL PROTECTED]"; And then included as the fourth input to the function.. mail("[EMAIL PROTECTED]", "test", "testbody", $headers); Be aware that forging headers can get you into trouble with the spam blockers regardless of the legitimacy of your intentions. Go to Google Groups and read up on what you need to know in order to keep your legitimate mail servers from being black listed. Read more about the mail() function.. http://www.php.net/manual/en/function.mail.php -Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php