发送UTF-8编码的自定义邮件到并回复到
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了发送UTF-8编码的自定义邮件到并回复到相关的知识,希望对你有一定的参考价值。
Parameters: - $to - email address to send the mail - $subject - subject - $message - message body (html allowed) - $from_name - sender's name - $from_email - sender's email - $reply_to_name = custom, different from $from_name name to be used for replying to this message - $reply_to_email = custom, different from $from_email email to be used for replying to this message
function send_mail($to, $subject, $message, $from_name, $from_email, $reply_to_name=false, $reply_to_email=false) { if($reply_to_name == false) $reply_to_name = $from_name; if($reply_to_email == false) $reply_to_email = $from_email; return false; } return false; } return false; } $headers .= 'From: '.$from_name.' <'.$from_email.'>' . PHP_EOL; $headers .= 'Reply-To: '.$reply_to_name.' <'.$reply_to_email.'>' . PHP_EOL; $headers .= 'Return-Path: '.$from_name.' <'.$from_email.'>' . PHP_EOL; $headers .= 'Content-Type: text/html; charset=UTF-8'.PHP_EOL; $headers .= 'Content-Transfer-Encoding: base64 '.PHP_EOL; return true; } else { return false; } }
以上是关于发送UTF-8编码的自定义邮件到并回复到的主要内容,如果未能解决你的问题,请参考以下文章
使用SwiftMessage从回复电子邮件中获取Laravel中的自定义标头
我想用java对tomcat进行监控,比如tomcat内存溢出要监控到并自动重启,将消息发送邮件给管理人员。
JavaMail 从字符串发送邮件附件 - 编码 UTF-8