phpmailer

PHPMailer not working: Message could not be sent

淺唱寂寞╮ 提交于 2019-12-10 11:18:01
问题 I am trying to create a contact form on my website using PHPMailer. I am having some trouble setting it up. I am trying to use G-mail as my smtp host. I was wondering if anyone can help troubleshoot this? This is my mailer code: <?php require("class.phpmailer.php"); require("class.smtp.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; // turn on SMTP authentication $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail $mail->Host = 'smtp.gmail.com';

PHPMailer - SMTP Error: Could not connect to SMTP host

大城市里の小女人 提交于 2019-12-10 10:44:26
问题 I'm trying to send email using PHPMailer. When I tried sending the email from gmail account, it works perfectly fine. However, I would like to send the email from my own SMTP, but there seems to be an error. What could be the problem? Please help me. Thank you. Using smtp.gmail.com : $mail->SMTPDebug = 3; $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->SMTPAuth = true; $mail->Username = 'myemail@gmail.com'; $mail->Password = 'password'; $mail->SMTPSecure = 'tls'; $mail->Port = 587;

Phpmailer AddBcc not working

旧城冷巷雨未停 提交于 2019-12-10 00:50:22
问题 I am using phpmailer to sent email, and it works the recipients receive the mail except the bcc and cc details is not showing the mail. Someone can suggest a solution to this . the code is require_once("PHPMailer_v5.1/class.phpmailer.php"); require_once("PHPMailer_v5.1/language/phpmailer.lang-en.php"); $mailer = new PHPMailer(); $mailer->IsSMTP(); $mailer->SMTPAuth = true; $mailer->SMTPSecure = "tls"; $mailer->Host = 'smtp.gmail.com'; $mailer->Port = 587; $mailer->Username = "myuserid";

Php mailer google smtp working on localhost not working on live site

谁说我不能喝 提交于 2019-12-09 20:45:07
问题 I'm trying to send mail to registered user after registration. For that I m using phpmailer library. my code is as below: function smtpmailer($to, $from, $from_name, $subject, $body) { global $error; $username = "xyz@demo.net"; $password = "1234567"; $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->SMTPSecure = 'ssl'; // secure

PHPMailer 5.1 sends duplicatie mails when adding more than 1 receiver

隐身守侯 提交于 2019-12-09 16:59:16
问题 I'm using PHPMailer for a while now and never really had any problems, but last week I installed one of my CMS on a website and the client insisted on having 2 e-mails receiving the contents of the contact form of his website. Ok, no problem I thought, just adding an e-mail address using the $phpmailer->AddAddress() function. However, adding a second receiver is causing PHPMailer to send the mail twice to both receivers. I tried adding a third receiver to see if I got it three times, but this

phpMailer not arriving in Hotmail?

断了今生、忘了曾经 提交于 2019-12-09 16:36:01
问题 After setting up SPF Record i still am here to verify why i cannot recieve this email to hotmail account. I am able to send it to gmail with no issues. Please confirm if the code is correct, and SPF record is correct: <?php require_once 'PHPmailer/class.phpmailer.php'; $mail = new PHPMailer(); $body = "Thankyou for your Purchase. <br/><br/> Here is your Policy! You are now Protected during your Travels."; $mail->AddAddress('$payer_email'); $mail->From = "noreply@example.com"; $mail->FromName

fastest way to send mails using phpmailer smtp?

寵の児 提交于 2019-12-09 07:14:34
问题 i am using following phpmailer function to send 1000+ mails <?php function sendMail($sendTo,$Subject,$Body){ require_once 'PHPMailer/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->isSMTP(); $mail->Host = 'smtp.example.com;smtp.example.com'; $mail->SMTPAuth = true; $mail->Username = 'newsletter@example.com'; $mail->Password = 'password'; $mail->SMTPSecure = 'ssl'; $mail->Port = 465; $mail->From = 'newsletter@example.com'; $mail->FromName = 'xyz'; $mail->WordWrap = 50; $mail->isHTML(true

PHPMailer only sends email when SMTPDebug = true

浪子不回头ぞ 提交于 2019-12-09 05:59:35
问题 I'm using PHPmailer. It works when $mail->SMTPDebug = true; but when I remove that line, it silently fails. I say silently fails as it doesn't give any errors, and yet the email doesn't seem to be delivered. $mail = new PHPMailer; $mail->SMTPDebug = true; $mail->SMTPAuth = true; $mail->CharSet = 'utf-8'; $mail->SMTPSecure = 'ssl'; $mail->Host = 'smtp.gmail.com'; $mail->Port = '465'; $mail->Username = 'xxxxx@gmail.com'; $mail->Password = 'xxxxx'; $mail->Mailer = 'smtp'; $mail->AddReplyTo(

Sending multiple emails with PHPmailer

杀马特。学长 韩版系。学妹 提交于 2019-12-09 03:23:29
问题 Edit: I forgot I'd created the SendMail(); function myself, which is why the explanation doesn't mention at first what it does. I'm having some trouble with PHPMailer (https://github.com/PHPMailer/PHPMailer) when attempting to send two emails, one directly after the other. The script is almost completely 'out of the box', with only a few modifications such as a foreach loop to allow for multiple addresses, and everything still works perfectly. However, if I attempt to call more than one

How to send email with Phpmailer with DKIM signature?

时光总嘲笑我的痴心妄想 提交于 2019-12-09 03:18:46
问题 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