Can anyone point me to some good code on generating an email based on data that has been submitted to a table.
I'm doing a little shopping cart application and would like to email the customer a copy of their order upon successfully placing the order.
Any suggestions of where to look? Also, I know my web hosting provider provides SMTP mail, but is there any specific information I'll need from them in order to complete the script?
Thanks!
Email generation based on table entries...
Moderator: General Moderators
-
dardsemail
- Forum Contributor
- Posts: 136
- Joined: Thu Jun 03, 2004 9:02 pm
Code: Select all
set_time_limit(1200);
require("Mail.php");
$headers['From']= "support@{$_SERVER['SERVER_NAME']}";
$headers['Subject'] ="Registration";
$to = ($_REQUEST['email']);
$body = "Thank you for whatever '".$_POST['formfieldname']."'";
$body .= '';
$body .= "This is the time this mail was generated: " . date("F j, Y, g:i a");
$message=& Mail::Factory('mail');
$message->send($to,$headers,$body);-
dardsemail
- Forum Contributor
- Posts: 136
- Joined: Thu Jun 03, 2004 9:02 pm