phpmailer

PHPmailer sends to junk email

狂风中的少年 提交于 2019-12-06 08:37:04
问题 I've just updated a contact form to use PHPMailer to stop emails being marked as junk, with no luck. It's a fairly straight forward setup I'm using but its still going into peoples junk mail. Here is my script, I was wondering if anyone could tell what was wrong? include_once('../inc/phpmailer/class.phpmailer.php'); $mail = new PHPMailer(); $name = $_POST['name']; $email = $_POST['email']; $body = "Name: ".$name."\r\n"; $body .= "Email: ".$email."\r\n"; $body .= "Message: ".$_POST['message'];

use of phpmailer class

梦想与她 提交于 2019-12-06 06:15:22
i m using phpmailer class for sending emails. i m geeting error "Could not execute: /smtp" the following code the code is below. can someone suggest me what is the problem. require '../class.phpmailer.php'; try { $mail = new PHPMailer(true); //New instance, with exceptions enabled $body = file_get_contents('contents.html'); echo $body; $body = preg_replace('/\\\\/','', $body); //Strip backslashes $mail->IsSMTP(); // tell the class to use SMTP $mail->SMTPAuth = true; // enable SMTP authentication $mail->Port = 25; // set the SMTP server port $mail->Host = "ssl://smtp.gmail.com"; // SMTP server

Bounce Support for Swiftmailer

跟風遠走 提交于 2019-12-06 05:39:31
I see recommendations for Swiftmailer for handling bounce messages here, yet I don't see the support for this in the documentation. Am I missing something? It appears to me that PHPMailer-BHM is the only option out there with this feature ready to go out of the box. If this is incorrect, please elaborate. I am asking because Swiftmailer looks to have the best documentation and support moving forward, but I don't want to spend time re-inventing the wheel creating a class to parse and handle the NDR's. Swiftmailer is more concerned with sending email (e.g. from your script to an SMTP server

'To' address being added twice while using PHPmailer

懵懂的女人 提交于 2019-12-06 04:12:37
I am using PHPmailer to send mails. However, the mail is being sent to each user twice. Below is the screen-shot of a test mail. The following is my code : <?php ##REQUIRED FUNCTION function send_mail_to($receiver, $msg) { $subject="[ TNP Update ] - Do you like the new look ?"; #Grab the PHPmailer class require_once('./lib/phpmailer/phpmailer.inc.php'); #Create object $mailer = new PHPmailer(); //Instantiate class $mailer->From="tnp@aakashbhowmick.in"; $mailer->FromName="TNP Mailer"; $mailer->IsHTML(true); $mailer->Subject = $subject; $mailer->Body = $msg; $mailer->AddAddress($receiver); #Send

使用PHPMAILER实现PHP发邮件功能

半腔热情 提交于 2019-12-06 03:52:32
第一步: 打开网址https://github.com/PHPMailer/PHPMailer/ 下载PHPMailer,PHPMailer 需要 PHP 的 sockets 扩展支持,而登录 QQ 邮箱 SMTP 服务器则必须通过 SSL 加密的, PHP 还得包含 openssl 的支持。 第二步:使用 phpinfo() 函数查看 socket 和 openssl 扩展信息(wamp server 默认启用了该扩展)。 openssl 如果没有开启请打开php.ini文件进行开启 首先检查php.ini中;extension=php_openssl.dll是否存在, 如果存在的话去掉前面的注释符‘;’, 如果不存在这行,那么添加extension=php_openssl.dll。 PHPMailer 核心文件 第三步: QQ 邮箱设置 所有的主流邮箱都支持 SMTP 协议,但并非所有邮箱都默认开启,您可以在邮箱的设置里面手动开启。 第三方服务在提供了账号和密码之后就可以登录 SMTP 服务器,通过它来控制邮件的中转方式。 第四步:开启 SMTP 服务 选择 IMAP/SMTP 服务,点击开启服务 第五步:验证密保 发送短信“配置邮件客户端”至1069-0700-69 第六步:获取授权码 SMTP 服务器认证密码,需要妥善保管(PS:密码直接没有空格) 第七步:PHP发送邮件

中文详解phpmailer所有对象和属性

走远了吗. 提交于 2019-12-06 03:51:05
2009-03-09 19:13:50 前言: phpmailer是一个优秀的发件程序,但 中文 资料比较少,于是有牛人手动翻译了 phpmailer 的elementindex. html ,E文的: [url]http://www.bblog.com/apidoc/elementindex_[/url] PHP ,因为水平有限,翻译的地方可能不是很准,希望大家给予补充。因为东西较多,所以分三页 A-C From: [url]http://www.xiaoxiaoyu.cn/AMP/215.html[/url] A开头: $AltBody --属性 出自:PHPMailer::$AltBody ,文件:class.phpmailer.php 说明:该 属性 的设置是在邮件正文不支持HTML的备用显示 AddAddress --方法 出自:PHPMailer::AddAddress(),文件:class.phpmailer.php 说明:增加收件人。参数1为收件人邮箱,参数2为收件人称呼。例AddAddress("[email]xiaoxiaoxiaoyu@xiaoxiaoyu.cn[/email]","xiaoxiaoyu"),但参数2可选,AddAddress([email]xiaoxiaoxiaoyu@xiaoxiaoyu.cn[/email])也是可以的。 函数 原型:

“Could Not Access File:” in PHPmail function

人走茶凉 提交于 2019-12-06 03:48:10
I am trying to email a file that exists on my server using PHPMailer. When I run this code, I get "Could not access file" and the email sends without the attachment.can anyone guide me how to fix this $checkyes=$_POST['check']; $date = date('Y-m-d'); $my_path ="/data/data/www/fms/pricelists/$checkyes{$date}.xls"; include "class.phpmailer.php"; // include the class file name $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled //$mail-

How to set DSN (Delivery Status Notification) for PHPMailer?

别说谁变了你拦得住时间么 提交于 2019-12-06 03:45:41
I'm trying to find out how to set DSN when using PHPMailer. I know at the SMTP Protocol level, the DSN is specified after RCPT TO, e.g. RCPT TO: NOTIFY=SUCCESS,FAILURE ORCPT=rfc822;recipientemail@gmail.com Also, I will like to direct the DSN to other than the sender address if that is possible. Appreciate any pointers, thanks. I discovered that PHPMailer doesn't support DSN, so I had to amend class.smtp.php itself. Original Code: fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); Change to: fputs($this->smtp_conn,"RCPT TO:<" . $to . "> NOTIFY=SUCCESS,FAILURE ORCPT=rfc822;" . $to ."

Adding embedded images within mail body phpmailer class

半腔热情 提交于 2019-12-06 03:30:54
Im trying to embed an image within my message body but it ends up as an attachment $mailer->Subject = APP_NAME . " - " . $name . " send you and Ad : " . $row['name']; $mailer->IsHTML(true); $mailer->AddEmbeddedImage('../images/namDiams.png', 'logoimg', 'namDimes.png'); //footer $footer = "Regards<br/><br/>"; $footer .= '<table style="width: 95%">'; $footer .= '<tr>'; $footer .= '<td>'; $footer .= "<strong><span style='font-size: 15px'>NamDimes Team</span></strong><br/> NamDimes<br/> Contact Number: " . APP_CONTACT . "<br/> Email: " . APP_EMAIL . "<br/> Website: " . APP_WEBSITE . "<br/>";

How to send email with Phpmailer with DKIM signature?

我怕爱的太早我们不能终老 提交于 2019-12-06 02:11:18
I`m using PHPmailer to sent email. I installed postfix service and DKIM-Milter to generate the key. It works fine if i use command line to sent mail, and the mail is with DKIM signature displaying "signed-by:mydomain.com" Authentication-Results: mx.google.com; spf=pass (google.com: domain of root@mydomain.com designates 182.50.xxx.xxx as permitted sender) smtp.mail=root@mydomain.com; dkim=pass header.i=@mydomain.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mydomain.com; s=default; t=1325531456; bh=+gZFhu4Id2AXb8UVbFLzDVVlChWGhvxvJUIdjdMLQsk=; h=To:Subject:Message-Id:Date:From; b