Php 我需要发件人在电子邮件主题中的电子邮件id
我的php脚本运行良好,但我想在电子邮件主题发送发件人地址。请指导我如何做 请告诉我在“$emailSbuject=$emailFeild的新订阅\r\n”中应该写什么 这是我的php脚本:Php 我需要发件人在电子邮件主题中的电子邮件id,php,Php,我的php脚本运行良好,但我想在电子邮件主题发送发件人地址。请指导我如何做 请告诉我在“$emailSbuject=$emailFeild的新订阅\r\n”中应该写什么 这是我的php脚本: <?php /* subject and email varialbles*/ $emailSbuject = "New Subscription from $emailFeild\r\n"; $webMaster = 'help@sample.com'; $emailSbuject2 = 'Tha
<?php
/* subject and email varialbles*/
$emailSbuject = "New Subscription from $emailFeild\r\n";
$webMaster = 'help@sample.com';
$emailSbuject2 = 'Thank you';
$client = ' $emailFeild\r\n';
/*gathering data variables*/
$emailFeild = $_POST['email'];
// admin message body
$body= <<<EOD
New subscriber is $emailFeild
EOD;
$textMessage = <<<EOD
<p style="margin-left:5px;font-family:Calibri"><img alt="" src="http://www.intaxfin.com/images/Intaxfin_logo.png"></p>
<p style="font-family:Calibri">Thank you for subscribing with us. Somebody will get back to you as soon as possible.</p>
<p style="font-size:x-small;color:#0099FF;font-family:Calibri">This e-mail was automatically sent by Administration Directory and is for your reference. Please do not reply to this e- mail address.<br>
Powered by sample</p>
EOD;
$headers = "From: $emailFeild\r\n";
$header = "From: $noreply@sample.com\nMIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n";
$success = mail($webMaster,$emailSbuject,$body,$headers);
$success1 = @mail($emailFeild,$emailSbuject2,$textMessage,$header);
/*Result*/
$theResults = <<<EOD
EOD;
echo "$theResults";
header("Location: thankyousubscribe.html");
exit;
?>
注意:$client已使用$emailFeild变量启动,该变量在该行之后启动。请先启动变量,然后使用它。先生,请帮助我@Bowdzone
$emailSbuject=“来自“$emailFeild”的新订阅。\r\n”代码>@Bowdzone-thnx先生。它的工作非常好我的答案被选中了,现在我不知道为什么它被撤销了,我投了反对票…很抱歉,你的代码不起作用@鲍佐内给出了正确的答案。
$emailFeild = $_POST['email'];
$emailSbuject2 = "New Subscription from $emailFeild";