相关疑难解决方法(0)

如何发送UTF-8电子邮件?

当我发送电子邮件时,电子邮件不会显示英语以外的字符.它确实如下所示:

ä½™C"雅»ä»

实际上可能知道这是什么原因?即使我尝试在脚本中添加Content-type和charset,它仍然显示相同.

我用了 Mail::Factory("mail");

php email utf-8

76
推荐指数
2
解决办法
18万
查看次数

PHP Mailer头编码的问题

    <?php
require_once('../class.phpmailer.php');
//include("../class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
iconv_set_encoding("internal_encoding", "UTF-8");

$mail             = new PHPMailer();
$mail->CharSet = "utf8";
/*
$body             = file_get_contents('contents.html');
$body             = eregi_replace("[\]",'',$body);
*/
$mail->IsSMTP(); // telling the class to use SMTP
//$mail->Host       = "mail.app-cpr.com"; // SMTP server
//$mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
                                           // 1 = errors and messages
                                           // 2 = messages only
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = "tls";                 // sets the prefix …
Run Code Online (Sandbox Code Playgroud)

php email encoding character-encoding phpmailer

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

email ×2

php ×2

character-encoding ×1

encoding ×1

phpmailer ×1

utf-8 ×1