-2
送我有PHP代码如何在PHP中添加HTML以HTML
但洽洽发送的文本模式
,我想编辑的消息与HTML模式下工作
这是我的contact.php的代码
<?php
$webmaster_mail = '[email protected]';
$redirect_page = 'http://www.xxxx.com/';
$message_subject = 'msg';
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$in_Body ='';
foreach($_POST as $in_k=>$in_v) {
$in_Body .="$in_k = $in_v\n\n";
}
$in_Body .= 'IP: ' . $_SERVER['REMOTE_ADDR'] . "\n\n";
#$in_Body .= 'Host Name: ' . gethostbyaddr($_SERVER['REMOTE_ADDR']) . "\n\n"; //old get host name
$in_Body .= 'Host Name: ' . $hostname . "\n\n";
$in_Body .= 'Browser: ' . $_SERVER['HTTP_USER_AGENT'] . "\n\n";
$in_Body .= 'Time: ' . $gmdate . "\n\n";
$in_Body .= 'Os: ' . getOS($_SERVER['HTTP_USER_AGENT']) . "\n\n";
#$in_Body .= 'country: ' . getCountry() . "\n\n";
$in_Body .= 'country: ' . $ip2c->get_country_name() . "\n\n";
mail(trim($webmaster_mail), "$message_subject ", "$in_Body","From: " . trim($webmaster_mail));
header("Location: $redirect_page");
//close();
?>
在电子邮件中添加表格和徽标时,请参阅msg –
您想将其添加到您的问题吗?以及你遇到的具体问题的细节? – andrewsi
不要建立你自己的哑剧电子邮件。使用[PHPMailer](http://phpmailer.worxware.com)或[Swiftmailer](http://swiftmailer.org)。它们使用起来更容易,并使得发送HTML邮件变得微不足道。 –