Results 1 to 3 of 3
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
04-26-2005 #1
- Join Date
- Jan 2005
- Location
- UK
- Posts
- 77
Changing from address of server generated mail
-
04-27-2005 #2
- Join Date
- Jan 2005
- Location
- UK
- Posts
- 77
anyone?
-
05-10-2005 #3
- Join Date
- May 2005
- Location
- Ontario, Canada - Eh!
- Posts
- 17
Here's what I've got as a helper
Now of course there's some other fields/variabled to be set, but this gives you a general idea. May not be the best programming, but I know it works - gets used for my work everyday. This came from the page that sends the mail - i've got it setup as a 2 page form, first one passing the information to this page. So the variables aren't exactly as they may be needed for your application.
#############################################
// SETTING THE VARIABLES
$toemail = 'Whoever <emailddress@theirdomain.com>';
$ccemail = 'Someoneelse <emailaddress@domain.com>';
$bccemail = 'Administrator <admin@mydomain.com>';
// EMAIL MESSAGE HEADERS
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: ' . $toemail . "\r\n";
$headers .= 'From: ' . $bccemail . "\r\n";
$headers .= 'Cc: ' . $ccemail . ',' . $toemail . "\r\n";
$headers .= 'Bcc: ' . $bccemail . "\r\n";
// SENDING THE EMAIL
mail($to, $subject, $message, $headers);
echo "<center>SUCCESS!
Mail has been sent!</center>";
#############################################
Running with PHP5 and Apache 2.
Hope it helps