phpmailer

PHPMailer, SMTP connect() failed error with Gmail

假装没事ソ 提交于 2019-11-29 14:39:42
I’m trying to make a contact form and I’m using PHPMailer. I tried that on localhost with xampp and it works perfect. But when i upload to my host i get the error SMTP connect() failed. Here is my code: $m = new PHPMailer; $m->isSMTP(); $m->SMTPAuth = true; $m->Host = "smtp.gmail.com"; $m->Username = "mymail@gmail.com"; $m->Password = "mypass"; $m->SMTPSecure = "ssl"; $m->Port = "465"; $m->isHTML(); $m->Subject = "Hello world"; $m->Body = "Some content"; $m->FromName = "Contact"; $m->addAddress('mymail@gmail.com', 'Test'); I've tried to change the port to 587 and the SMTPsecure to tls (and all

PHPMailer .Exception:SendAsDeniedException.MapiExceptionSendAsDenied

喜欢而已 提交于 2019-11-29 14:11:06
i have installed PHPMailer on my website. but, i can't get it to work the way it should. when i send an email through the website i get the following error: 08:12:53 CLIENT -> SERVER: RCPT TO: 2016-10-13 08:12:53 CLIENT -> SERVER: DATA 2016-10-13 08:12:53 CLIENT -> SERVER: Date: Thu, 13 Oct 2016 08:12:51 +0000 2016-10-13 08:12:53 CLIENT -> SERVER: To: Kevin Kloet 2016-10-13 08:12:53 CLIENT -> SERVER: From: Name <myEmail@email.com> 2016-10-13 08:12:53 CLIENT -> SERVER: Reply-To: Name <myEmail@email.com> 2016-10-13 08:12:53 CLIENT -> SERVER: Subject: Subject 2016-10-13 08:12:53 CLIENT -> SERVER:

PHPMailer Mass mailing using BCC and catching not successfull email addressses

我们两清 提交于 2019-11-29 13:08:10
I am trying to send NewsLetter to 1500 users using PHPMailer and my SMTP servers. I have tried sending the mails to 2 BCC emails for test, and it sucessfully sent mails. But before I go ahead and send the mail to 1500 email address, I have few questions. I am using this code snippet. <?php require "../PHPMailer-master/PHPMailerAutoload.php"; $bcc_list = array('emailaddrs1,emailaddress2'); $mail = new PHPMailer(); $body = file_get_contents('contents.html'); $body = eregi_replace("[\]",'',$body); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp.myserver.com"; // SMTP server

SMTP error with PHPMailer

只愿长相守 提交于 2019-11-29 11:17:25
I am getting "SMTP Error: Could not connect to SMTP host." error while trying to send mails using GMAIL SMTP and PHPMailer.. The code is working perfectly in local environment but getting error in live (bluehost) server.. Please help Bluehost wont allow gmail SMTP connections . Quoting article: According to bluehost, you cannot send emails through SMTP connections from web applications hosted on bluehost. They only allow sending through their own SMTP servers. The work around is that I setup a email account in Bluehost the same as the email I use in Google Apps. I then modified the code in

PHPMailer on godaddy server, setup correctly?

前提是你 提交于 2019-11-29 11:05:00
I've just signed up for a godaddy server to test a PHP script I'm writing. I'm using PHPMailer to send a emails, it uses the godaddy email Host : relay-hosting.secureserver.net The problem is that I would like to mark the email as from "me"@gmail.com When I've sent emails using my gmail address in the AddReplyTo field the recipient email account sends it straight to the Junk folder. I know there is a fundamental problem here, that I'm sending conflicting headers and this is probably why it gets put into the junk folder. Can someone please explain to me how I can resolve this. Thank you. Code:

PHPMailer using Gmail SMTP slow when sending emails

前提是你 提交于 2019-11-29 10:34:38
问题 I found few older threads that have a similar issue but most of them didn't have answers or if they had, the suggestions weren't relevant in my case. I had a complete setup at one point with PHP mail function and it worked great. I had to format my hard drive at one point and setup the server from scratch. Afterwards, PHP mail function became slow. While researching solutions for that, I found that most people recommended PHPMailer. I switched to that but the problem still persisted. Most of

Should I use php mail function or phpmailer?

佐手、 提交于 2019-11-29 10:34:05
Well, so far, I have been using php built in function, mail(), and I have no problems with it, even I sent a blast to 1000+ users. But then, lately I found this phpmailer, which is specially design to send email. Q1: Should I change to this phpmailer? Q2: What are the advantages of using phpmailer? Q3: I found other products on phpmailer website, i.e phpmailer FE, ML etc. What are those? Which one you guys is using? Q4: Have anyone tried sending blast email to 2000+ users with phpmailer? If yes, does it cause any problems? Q1: You should definitely switch away from using mail() Q2: mail()

Phpmailer AddBcc not working

只愿长相守 提交于 2019-11-29 09:14:48
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"; $mailer->Password = "mypassword"; $mailer->FromName = $fromname; $mailer->From = "myuserid"; $mailer-

PHPMailer Mailer Error: Message body empty

不打扰是莪最后的温柔 提交于 2019-11-29 08:14:49
I'm trying to get the basic example working for PHPMailer. All I done was upload the whole PHPMailer_5.2.2 folder, configured the page below as per the code you see and I keep getting Mailer Error: Message body empty , but I can clearly see the contents.html file has html in it and isn't empty. This is the example file I'm using from the PHPMailer PHPMailer_5.2.2/examples/test_smtp_gmail_basic.php I tried using the settings I have in Outlook for Gmail that works, I know my username and password, the SMTP port is 587 and it's set to TLS, I tried replacing SSL with TLS in the code below, I still

How to change envelope sender address using phpmailer?

三世轮回 提交于 2019-11-29 07:34:04
With php mail() I can write mail('to@example.com','subject!','body','From: from@example.com','-f from@example.com'); But how can I do the same with phpmailer ? This example shows how. the relevant lines: $mail->SetFrom('name@yourdomain.com', 'First Last'); $mail->AddReplyTo('name@yourdomain.com', 'First Last'); Hannes Morgenstern The relevant line in Theolodis answer is: $mail->SetFrom('name@yourdomain.com', 'First Last'); There is no need to use AddReplyTo() this is something completely different. You only need to set your from address (and name optionally) by using SetFrom() . If you look at