Re: Sending email from db results
| From: | Matthew Ballard | Date: | Tue, 12 Dec 2000 09:18:05 +0000 |
| Subject: | Re: Sending email from db results | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29848@lists.php.net to get a copy of this message | ||
Sending mail is actually quite simple:
mail ($email,"Your Lost Password","Here is your lost $username and $password"[, string additional_headers]);
If you want use returns in your email body, use \n .
The [, string additional_headers] is optional, only needed if you want to specify things like From:, Reply-To:, Cc:, Bcc:, X-anything:
and would be used like:
,"From: user@email.dom\nReply-To: user@email.dom" replacing user@email.dom with any email address (they don't have to be the same).
Matthew
At 01:04 AM 12/12/2000 -0500, you wrote:
Hello I am writing a send lost password script, that takes the email that a user enters and compares it to the database to see if there is a match and then emails the username and password to the user. I already wrote the comparison stuff and I need to know how to write the mail command, I tried the manual but I am still confused if the strings are $email (the address in the database) and $username and $password what would the mail command look like if it is to say Subject: Your lost password Body of message: Here is your lost $username and $password Thanks in advance. Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net