phpmailer

thinkphp引入phpmailer发送邮件

房东的猫 提交于 2019-12-17 02:01:53
在tp系统文件下的Extend->Vendor->Zend下放置phpmailer文件包,并把phpmailer类改名。 看目录: 然后参考tp手册: so...我的导入方法代码为: Vendor('Zend.PHPMailer.classphpmailer'); 完整的邮件发送代码: 首先是发送方法: public function sendmail($sendto_email, $user_name, $subject, $bodyurl) { Vendor('Zend.PHPMailer.classphpmailer'); $mail = new PHPMailer(); $mail->IsSMTP(); // send via SMTP $mail->Host = "你的邮件服务域名"; // SMTP servers $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "XXXX"; // SMTP username 注意:普通邮件认证不需要加 @域名 $mail->Password = "******"; // SMTP password $mail->From = "axx@xxx.com"; // 发件人邮箱 $mail->FromName = "管理员"; // 发件人

Mailer function error

耗尽温柔 提交于 2019-12-13 22:45:12
问题 SMTP -> ERROR: DATA not accepted from server: 550 This message was classified as SPAM and may not be delivered $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "mail.cc.com"; $mail->SMTPAuth = true; $mail->Username = "info@cc.com"; $mail->Password = "cc"; $mail->From = "cc.com"." <info@cc.com>"; $mail->AddReplyTo("cc1@gmail.com"); $mail->FromName = "info@cc.com"; $mail->AddAddress($climail); $mail->AddCC("cc1@gmail.com"); $mail->Sender="info@cc.com"; $mail->IsHTML(true); $mail-

Send email using PHPMailer, Mailgun and HTTP api

若如初见. 提交于 2019-12-13 22:35:03
问题 I Am able to send emails off this web server I am on a shared web server using godaddy, and it's been awesome for me in a number of ways. I host two aspects of my website on here: a public wordpress site and an employee intranet. That's right, it has two aspects, with my custom built intranet being hosted next to a wordpress site. I CAN send emails. The way I can send emails is via the Mailgun plugin for wordpress. As far as I can tell, this is the ONLY way my web server is sending emails

Ajax Form Submit with attachment

独自空忆成欢 提交于 2019-12-13 20:54:09
问题 I have a Form on my Site thats submitted true ajax. This Form has a field where to attache .pdf files. How when submitting the form though the file is not send with the rest of data. How can i get this to work? Here is my ajax code: $('#submit_btn').click(function () { $.ajax({ type: 'POST', url: '/contact.php', dataType: "json", data: $('#contactform').serialize(), success: function (data) { console.log(data.type); console.log(data.msg); var nClass = data.type; var nTxt = data.msg; $("

SMTP stopped sending mails

﹥>﹥吖頭↗ 提交于 2019-12-13 20:33:48
问题 I have a mail delivering script running on various pages in my website for localhost XAMPP. It was working fine till last evening and as I started today again any page having phpmailer script gives error as SMTP ERROR: Failed to connect to server: (0) SMTP connect() failed. I haven't changed anything into the local server configuration and my GMAIL credentials but unable to figure out possibly what has gone wrong into the SMTP settings so that this error is coming up. I have done all my

Error in sending email using phpmailer - Relaying disallowed SMTP Error: data not accepted

安稳与你 提交于 2019-12-13 17:28:23
问题 I am trying to send email using phpmailer, but the following code fails to send email with this error: SMTP ERROR: DATA END command failed: 553 Relaying disallowed SMTP Error: data not accepted. Mailer Error: SMTP Error: data not accepted. Code is below: <?php require 'phpmailer/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->isSMTP(); $mail->CharSet = 'UTF-8'; // Set mailer to use SMTP $mail->Host = 'smtp.zoho.com'; // Specify main and backup server $mail->SMTPDebug = 1; $mail-

Using PHPMailer Results in many blocked emails

爱⌒轻易说出口 提交于 2019-12-13 16:14:02
问题 I am using PHPmailer; though probably a version from 2012 - I haven't updated it for a while. I am sending mail like this: $mail = new PHPMailer(); $mail -> IsSMTP(); $mail -> Host = "localhost"; $mail -> Port = 587; $mail -> SMTPAuth = true; $mail -> Username = EMAIL_USER; $mail -> Password = EMAIL_PASS; $mail -> From = EMAIL_USER; $mail -> FromName = "My Company"; $mail -> AddAddress($email); $mail -> AddReplyTo('<Same as "FROM">', 'User Name'); $mail -> IsHTML(true); $mail -> Subject =

Message was not sent.Mailer error: SMTP connect() failed

人走茶凉 提交于 2019-12-13 16:12:30
问题 I'm new in Php and find a Php mailer class to send email but getting following error. Error Message: Message was not sent.Mailer error: SMTP connect() failed. Php Code: <?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp.impeccableplus.com"; // SMTP server $mail->From = "from@example.com"; $mail->AddAddress("email@gmail.com"); $mail->Subject = "First PHPMailer Message"; $mail->Body = "Hi! \n\n This is my first e

Domain's email account with phpMailer and Gmail

陌路散爱 提交于 2019-12-13 10:44:50
问题 Two scenarios: I recently downloaded the phpMailer and added it to my public_html folder. I add my domain's email accounts to my gmail account. Two problems: When sending emails (domain's email account) using phpMailer and Gmail, and when the recipient received it, the red question mark is appearing instead of the Gmail's default profile photo. What do I need to do to solve this? I searched about in phpMailer that I need some DKIM and SPF keys or something. 回答1: Your message is not

PHP Mailer - User email getting sent to admin

点点圈 提交于 2019-12-13 09:28:53
问题 I am trying to send an email to user and admin using php-mailer.But when I send the mail, the user Acknowledgement mail is also getting sent to the admin. The e mails getting sent are in proper format. What is the issue here? My Code is Here: $name = "User Name"; $email = "user@gmail.com"; $mobile = 'User Phone No.'; $body = "<div><div>Name: <b>$name</b></div> <div>Email: <b>$email</b></div> <div>Mobile: <b>$mobile</b></div></div>"; //SMTP needs accurate times, and the PHP time zone MUST be