我怎样才能用phpmailer发送邮件, 以及像MS Outlook那样的紧急选项?
I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...
我怎样才能用phpmailer发送邮件, 以及像MS Outlook那样的紧急选项?
这样做的方法是增加外向电子邮件的重要性和优先信头。 MS Outlook使用自己的一个特定信头, 而其他大多数邮件客户则使用 importance
或 priority
。 通过 AddCustom Header ()
方法和 $Priority
属性, 添加它们到 PHP Mailler 中。
// 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");
请注意, 邮件客户端可以不执行/ 忽略这些信头, 这样您无法完全依赖它们。 此外, 许多垃圾邮件过滤器会使用它们作为识别垃圾邮件的红旗 。 谨慎使用它们 。
正式文件:
<强>补充: 强>
这项工作很好,但一些SPAM过滤器将使用优先配置(不重要)在SPAM中过滤。
php Mailer将设置优先旗 ALWAYS。 (默认为 3)
所以在我的php Mailer 类 我将评论这行
$This- & gt; 列首( X- 优先, $this- gt; 优先); code>
也许一个解决方案,比如:
类.phpmailer.php
if( $this- & gt; 优先 & gt; 0) $this- gt; HeaderLine( X 优先, $this- gt; 优先);
在你的php脚本里 像这样的东西:
$ yourMessage- gt; 优先级=0;
让它有点可配置
I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...
<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...
I found this script online that creates a thumbnail out of a image but the thumbnail image is created with poor quality how can I improve the quality of the image. And is there a better way to create ...
如何确认来自正确来源的数字。
Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...
I wonder there is a way to post a message to a facebook business page with cURL? thanks
I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...
How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...