在phpmailer中设置紧急选项
发布时间:2020-12-13 13:42:43 所属栏目:PHP教程 来源:网络整理
导读:我怎样才能发送带有phpmailer的邮件,并在MS Outlook中选择紧急设置? 这是通过向出站电子邮件添加重要性和优先级标头来完成的. MS Outlook使用自己的特定一个,而大多数其他邮件客户端使用重要性或优先级.通过AddCustomHeader()方法和$Priority属性使用 PHPMa
我怎样才能发送带有phpmailer的邮件,并在MS Outlook中选择紧急设置?
这是通过向出站电子邮件添加重要性和优先级标头来完成的. MS Outlook使用自己的特定一个,而大多数其他邮件客户端使用重要性或优先级.通过AddCustomHeader()方法和$Priority属性使用
PHPMailer添加它们.
// For most clients expecting the Priority header: // 1 = High,2 = Medium,3 = Low $yourMessage->Priority = 1; // MS Outlook custom header // May set to "Urgent" or "Highest" rather than "High" $yourMessage->AddCustomHeader("X-MSMail-Priority: High"); // Not sure if Priority will also set the Importance header: $yourMessage->AddCustomHeader("Importance: High"); 请注意,邮件客户端可以自由地不实现/忽略这些标头,因此您无法完全依赖它们.此外,许多垃圾邮件过滤器会将它们用作识别垃圾邮件的红旗.谨慎使用它们. 官方文件: PHPMailer Properties PHPMailer Methods (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |