Change FROM in email message
Posted: Sat Feb 04, 2006 12:42 pm
hawleyjr | Please use
Can you tell me what I'm doing wrong?
hawleyjr | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I am trying to send a message that does not look like it is from the root of the server but from our client. Yes, safe mode is OFF. This script would send an email message and originate from service@mysite.com (instead of appearing as it does now from the root at the server). I receive the Warning: mail(): SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /usr/local/4admin/apache/vhosts/mysite.com/httpdocs/sendmail.php on line 17 message when I try:Code: Select all
<?php
$to = "me@home.com";
$title = "Support subscription confirmation";
$mailheaders = "From: My Site <service@mysite.com>"; $mailheaders = "Reply - To: service@mysite.com";
$body = <<< emailbody
Dear subscriber,
This email confirms your purchase of a 30 day
email support subscription. Please direct all
requests to service@mysite.com.
Thank you,
My Site
emailbody;
$success = mail($to,$from,$title,$body, $mailheaders);
?>hawleyjr | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]