RE: [PHP-DB] mail()
| From: | Jennifer Goodie | Date: | Mon, 31 Mar 2003 23:28:55 +0000 |
| Subject: | RE: [PHP-DB] mail() | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26770@lists.php.net to get a copy of this message | ||
This is not so much a database question. The answer is yes, it can be. You
can read the documentation to find out how.
http://www.php.net/manual/en/function.mail.php
A quick example is:
<?php
$body = '';
foreach ($_POST as $key=> $val){
$body .= "$key = $val\n";
}
mail ($address, "Form submission", $body);
?>
That is really ugly an inelegant. I would suggest building off of it by
adding error checking and formatting the mail body.
-----Original Message-----
From: Mike Delorme [mailto:crazymonkey1385@hotmail.com]
Sent: Monday, March 31, 2003 3:23 PM
To: MySQL PHP Database Help
Subject: [PHP-DB] mail()
Can this fucktion be use to mail the submited content of a form? If so how?
Thanks for your time,
Mike Delorme