PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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:
<?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);
?>
<?php
mail("recipient@domain.com", "the subject", $message,
"From: From Name <webmaster@domain.com>\r\n" .
"Reply-To: Reply to <webmaster@domain.com>\r\n" .
"X-Mailer: PHP/" . phpversion());
?>