将多个POST数据附加到aa php电子邮件

将多个POST数据附加到aa php电子邮件,php,email,Php,Email,我用PHP发送一封电子邮件,但如何将以下变量添加到电子邮件正文中 这些值来自上一个from POST mailsend = mail("myemail@gmail.com", "this is the email subjct" , "this is the email body", "From: renault@cupon0km.com\r\n" . "X-Mailer: php"); print("$mailsend"); 编辑:不需要格式尝试以下操作: $_POST['Custom

我用PHP发送一封电子邮件,但如何将以下变量添加到电子邮件正文中 这些值来自上一个from POST

mailsend = mail("myemail@gmail.com", "this is the email subjct"
   , "this is the email body", "From: renault@cupon0km.com\r\n" . "X-Mailer: php");
print("$mailsend");
编辑:不需要格式

尝试以下操作:

$_POST['CustomFields_17_5'];
$_POST['CustomFields_12_5'];
$_POST['email'] ;
$_POST['CustomFields_16_5'];

这是非常容易做到的字符串连接,以及事实上,你没有说什么格式,你希望你的包括领域是在;它应该是一封原始电子邮件,并按原样打印这些字段,还是应该采用更好的格式?你需要在你的帖子中添加更多细节。这是邮件正文$\u post[CustomFields_17_5]$\u post[CustomFields_12_5]$\u post[email]$\u post[CustomFields_16_5]@JamWaffles不需要任何格式,你有什么建议吗?@sebas这是邮件正文{$\u post['CustomFields_17_5']}{您可能想考虑在数据上使用HTMLPARTARCHARS,在这种情况下,只需将每个POST值分配给变量,您就可以将变量放在字符串中:这是正文电子邮件:$email自定义:$Cuffy17Ly5等。
$body="this is the email body and these are my variables: ".$_POST['CustomFields_17_5']
    ." and ".$_POST['CustomFields_12_5'];." etc.";
mailsend = mail("myemail@gmail.com", "this is the email subjct"
   , $body, "From: renault@cupon0km.com\r\n" . "X-Mailer: php");
print("$mailsend");