phpmailer

PHP Mailer taking over 30 seconds to send a welcome email

大城市里の小女人 提交于 2019-12-02 00:21:39
So I am using the PHPMailer library in PHP to send a welcome email when ever my users registered, and it takes so long to do this. It takes around 30 - 50 seconds to actually load the home page, after clicking submit on the registration. It basically puts the page in a reloading state for over 30 seconds. The code I use is below... if ($config['user']['welcome_email_enabled']) $autoLoader->getLibrary('mail')->sendWelcomeEmail($email, $username); And my mail library is here. <?php /** * MangoCMS, content management system. * * @info Handles the mail functions. * @author Liam Digital

Can't get PHPMailer working [duplicate]

☆樱花仙子☆ 提交于 2019-12-02 00:18:07
This question already has an answer here: PHP parse/syntax errors; and how to solve them? 17 answers I am struggling to get PHPMailer setup and working in my application. The installation seems simple enough. My directory structure looks like this: |-[controllers] |---controller.php |-[vendor] |---[PHPMailer] |------class.phpmailer.php |------PHPMailerAutoload.php |-index.php index.php <?php ... require __DIR__ . '/vendor/PHPMailer/PHPMailerAutoload.php'; ... ?> controller.php <?php include('vendor/PHPMailer/class.phpmailer.php'); $mail = new PHPMailer(); ... ?> That's pretty much as simple as

PHPmailer duplicate email issue - conditional statement with $mail->Send()

非 Y 不嫁゛ 提交于 2019-12-01 23:07:10
问题 I came across a bizarre issue with PHPmailer (version 5.1) that I'm trying to work around. I've seen quite a bit of good feedback on here, so I thought I would give it a try. I've found that when I attempt to create a customized confirmation message with a conditional statement based on $mail->send() , I receive duplicate emails. I can duplicate it with the generic testemail.php script that comes with the phpmailer download. Here's the code: require '../class.phpmailer.php'; try { $mail = new

PHPMailer does not work with Gmail SMTP [closed]

不打扰是莪最后的温柔 提交于 2019-12-01 22:04:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . The following code works on my xampp local server, but doesn't send e-mails on a remote host. I get this error: Message could not be sent.Mailer Error: SMTP connect() failed require_once('header.php'); require_once('PHPMailer/PHPMailerAutoload.php'); function sendMail($address, $message){ $mail = new PHPMailer;

PHPmailer duplicate email issue - conditional statement with $mail->Send()

偶尔善良 提交于 2019-12-01 22:02:07
I came across a bizarre issue with PHPmailer (version 5.1) that I'm trying to work around. I've seen quite a bit of good feedback on here, so I thought I would give it a try. I've found that when I attempt to create a customized confirmation message with a conditional statement based on $mail->send() , I receive duplicate emails. I can duplicate it with the generic testemail.php script that comes with the phpmailer download. Here's the code: require '../class.phpmailer.php'; try { $mail = new PHPMailer(true); //New instance, with exceptions enabled $mail->SMTPDebug = 1; $mail->IsSMTP(); //

PHPMailer SMTP ERROR: Failed to connect to server

家住魔仙堡 提交于 2019-12-01 17:54:54
<?php include("class.phpmailer.php"); include("class.smtp.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Mailer = "smtp"; $mail->SMTPDebug = 2; $mail->Host = "ssl://smtp.gmail.com"; // specify main and backup server $mail->Port = 587; // set the port to use $mail->SMTPAuth = true; // turn on SMTP authentication $mail->SMTPSecure = "tls"; $mail->Username = "123@gmail.com"; // SMTP username $mail->Password = "password"; // SMTP password $mail->From = "123@gmail.com"; $mail->FromName = "Webmaster"; $mail->AddAddress("asd@hotmail.com"); $mail->AddReplyTo(

Multiple sending of email with attachment - repost

烈酒焚心 提交于 2019-12-01 14:49:16
I am re-posting this because no one answered my previous post. I am trying to send emails to multiple recipients with respective pdf files attached. I was successful with sending emails to multiple recipient but the recipients receive multiple emails. The number of emails received by a recipient is the number of email addresses stored in my database. The second problem that I have encountered was that the attachment sent to the recipients were all the same file. The scenario should be like this: recipient A should have email attached with pdf A, recipient B with pdf B, so on and so fort. Those

PHPmailer reports: Could not execute: /usr/sbin/sendmail

梦想与她 提交于 2019-12-01 14:38:24
问题 Why? I can send via mail() in PHP but I can't send via PHPMailer using IsSendmail() 回答1: Are you sure the path /usr/sbin/sendmail is correct? If yes, check also the permissions for sendmail are set correctly. 回答2: I've had the same error. Solved it by commenting/deleting this: $mail->IsSendmail(); Now it works correctly. I can send mails, and I receive them in my inbox. 回答3: I had this same issue. Spent almost an hour checking logs, checking sendmail paths and testing php mail() and sendmail

Retrieve of the bounce mail in php?

只愿长相守 提交于 2019-12-01 13:52:23
I am using swift mailer , which only provide me opition of failure mail, that is, indicate whether the mail delivered to outgoing mail server (not report after sending process). So i am finding any way to tell me whether there is bounce mail. I find zend and phpmailer BHM, the phpmailer has not updated for a while (2009) , so would zend the best choice can help me doing this or i can do it by some coding in php? Thank you Reference: 1.Zend http://framework.zend.com/manual/en/ 2.phpmailer BMH http://phpmailer.worxware.com/index.php?pg=bmh drew010 To process bounced messages, Zend Framework

Multiple sending of email with attachment - repost

这一生的挚爱 提交于 2019-12-01 13:31:01
问题 I am re-posting this because no one answered my previous post. I am trying to send emails to multiple recipients with respective pdf files attached. I was successful with sending emails to multiple recipient but the recipients receive multiple emails. The number of emails received by a recipient is the number of email addresses stored in my database. The second problem that I have encountered was that the attachment sent to the recipients were all the same file. The scenario should be like