我需要电子邮件主题中的发件人电子邮件ID


I need senders email id in email subject

我的php脚本运行良好,但我想在电子邮件主题中发送发件人地址。请指导我如何做。

请告诉我我应该在"$emailSbuject ="来自$emailFeild''r'的新订阅"中写什么

;

这是我的 php 脚本:

<?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;
?> 
 $emailFeild = $_POST['email'];
 $emailSbuject2 = "New Subscription from $emailFeild";

注意:$client 已使用在该行之后启动$emailFeild变量启动。请先启动变量,然后再使用它。