为什么不能将MIME html电子邮件发送到gmail? [英] Why cannot send the MIME html e-mail to gmail?

查看:78
本文介绍了为什么不能将MIME html电子邮件发送到gmail?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我遇到了一个问题,我可以发送html电子邮件

使用MIME通过php到雅虎邮箱和hotmail,但当我试着

发送到gmail,它显示所有html编码。

有人可以帮我解决这类问题吗?谢谢

我编写的代码----->:


<?php

$ a =< ;<< A

< form action ="" method =" post">

< input type =" submit"命名= [提交" value =" submit">

< / form>

A;

echo $ a;

if(isset($ _ POST [''submit'']))

{

$ to =''s***************@gmail.com ,st ******* @ yahoo.com'';


$ subject =''测试'';


$ message =''

< html>

< head>

< title> 8月的生日提醒< / title>

< / head>

< body bgcolor =" grey">

< p> MIME电子邮件!< / p>

< / body>

< / html>

'';


$ headers =''MIME-Version:1.0''。 " \\\\ nn ;;

$ headers。=''Content-type:text / html; charset = iso-8859-1''。" \\\\ nn";

$ headers。=''Content-Transfer-Encoding:7bit''。" \\\\ \\ n;


$ headers。=''来自:ck< st ******* @ yahoo.com>''。 " \\\\ nn ;;


邮件($ to,$ subject,$ message,$ headers);

echo" Email had已被发送!" ;;

}

?>


您的帮助对我很重要! ^ _ ^

解决方案

a =<<< A

< form action = "" method =" post">

< input type =" submit"命名= [提交" value =" submit">

< / form>

A;

echo


a;

if(isset(


_POST [''submit'']))

{

hello guys, i have met a problem that i can send the html e-mail by
using MIME via php to yahoo mail and hotmail, but when i was try to
send to gmail, it show all the html coding.
can someone help me to solve this kind of problem? thank you
the coding i made----->:

<?php
$a=<<<A
<form action="" method="post">
<input type="submit" name="submit" value="submit">
</form>
A;
echo $a;
if(isset($_POST[''submit'']))
{
$to = ''s*******@gmail.com,st*******@yahoo.com'';

$subject = ''Testing'';

$message = ''
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body bgcolor="gray">
<p>MIME email!</p>
</body>
</html>
'';

$headers = ''MIME-Version: 1.0'' . "\r\n";
$headers .= ''Content-type: text/html; charset=iso-8859-1''."\r\n";
$headers .= ''Content-Transfer-Encoding: 7bit''."\r\n";

$headers .= ''From: ck <st*******@yahoo.com>'' . "\r\n";

mail($to, $subject, $message, $headers);
echo "Email had been sent!";
}
?>

your kindly help is important to me! ^_^

解决方案

a=<<<A
<form action="" method="post">
<input type="submit" name="submit" value="submit">
</form>
A;
echo


a;
if(isset(


_POST[''submit'']))
{


这篇关于为什么不能将MIME html电子邮件发送到gmail?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆