phpmailer

PHPmailer sending bulk to a user base - should I use BCC or individual emails?

亡梦爱人 提交于 2019-12-11 06:55:11
问题 I have a user database with a few hundred users who need to receive a weekly update email, sent via a weekly scheduled task. When using PHPmailer, would it be better to send one email with all users in the BCC field, or multiple emails using the standard AddAddress field? Which is easier on the server and/or is one way more efficient than the other? 回答1: Individual emails. BCC is easier on the server, but gives you very little control, and there's more scope for sending the wrong thing to

How can I increase the speed of sending Secure SMTP emails?

你。 提交于 2019-12-11 06:38:11
问题 I have a PHPMailer 5.2.16 on a server using Exim 4.87 which also has a TLS certificate for secured connections. My PHP is thus: class MailerSMTP extends PHPMailer { /*** * Mailer for authenticated SMTP emails using account mail system ***/ public function __construct(){ $this->AddReplyTo('...', '...'); $this->setFrom('...', '...'); $this->Host = "hostname.co.uk"; $this->isSMTP(); $this->Timeout = 20; $this->SMTPAuth = true; $this->SMTPSecure = "tls"; $this->Port = "587"; $this->Username =

PHPMailer SMTP Connect Error

不羁的心 提交于 2019-12-11 06:35:23
问题 I'm trying to setup PHPMailer in AWS. It returns error saying SMTP connect() failed. Code <?php require 'vendor/autoload.php'; $mail = new PHPMailer; $mail->isSMTP(); $mail->SMTPDebug =2; $mail->Debugoutput = 'html'; $mail->Host = 'smtp.gmail.com'; $mail->Port = 587; $mail->SMTPSecure = 'tls'; $mail->SMTPAuth = true; $mail->AuthType = 'XOAUTH2'; $mail->oauthUserEmail = "xxx@gmail.com"; $mail->oauthClientId = "client-key.apps.googleusercontent.com"; $mail->oauthClientSecret = "secretkey";

Phpmailer not sending email on same domain

∥☆過路亽.° 提交于 2019-12-11 06:16:06
问题 I have a website and there is a contact form. My code below : $name = $_POST['name']; $email = $_POST['email']; $mail = new PHPMailer(true); if (!$mail->addAddress('email@domain.com','email')) { die('Invalid email address'); } $mail->isSMTP(); //$mail->SMTPAuth = true; $mail->SMTPDebug = 2; $mail->Host = 'localhost'; $mail->Subject = 'Subject'; $text = 'A mail...'; $mail->MsgHTML($text); $mail->SetFrom($email); //$mail->AddReplyTo($email,$name); if ($mail->Send()){ If user enter his/her mail

Unable to send email through gmail using PHPMailer_v5.1

穿精又带淫゛_ 提交于 2019-12-11 05:29:39
问题 I am trying to send email through gmail using PHPMailer_V5.1. Getting the following error, SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (41961176) SMTP Error: Could not connect to SMTP host. The following is the code which came with the PHPMailer download, I just modified the required fields, <?php require_once('../class.phpmailer.php'); //include("class.smtp.php"); // optional, gets called from

Contact Form with PHPMailer

☆樱花仙子☆ 提交于 2019-12-11 04:55:11
问题 I have a very simple form consisting of: Name Email Message I am using PHPMailer to send the form because I also want it to include an attachment (PDF) which sits on the server. I have gotten the form to a point where it can send either the name, email and attachment OR name, email and message. When one works it seems to disable the other. Please see below the PHP code I am using: <?php $field_fullname = $_POST['cf_mercury']; $field_email = $_POST['cf_jupiter']; $field_message = $_POST['cf

How to pass mail data from service provider to config/mail.php in laravel 4

只愿长相守 提交于 2019-12-11 04:48:13
问题 I was fetch mail configuration data using model file, and pass it to my provider the name CofigServiceProvider.php. But i don't know how to pass it into config/mail.php file. Because i need to change the mail configuration data dynamically from my admin panel. or Any other way to fetch db values and pass it app/config/mail.php in laravel 4 ConfigServiceProvider.php <?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Config; use Home; class ConfigServiceProvider extends

Can't Send Email PHPMailer 6.0 with Oauth Google

风流意气都作罢 提交于 2019-12-11 04:47:12
问题 0 with Google Oauth and i get this error 2017-08-04 06:38:42 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP v19sm895098pgc.93 - gsmtp 2017-08-04 06:38:42 CLIENT -> SERVER: EHLO localhost 2017-08-04 06:38:43 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [180.243.143.147]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8 2017-08-04 06:38:43 CLIENT ->; SERVER: STARTTLS 2017-08-04 06:38:43 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS 2017

Failed opening required '../vendor/autoload.php'

拜拜、爱过 提交于 2019-12-11 04:24:41
问题 when I try to send Email with phpmailer,the result of my code is Fatal error: require() [function.require]: Failed opening required '../vendor/autoload.php' (include_path='.;C:\php\pear'). What is my problem? <?php /** * This example shows making an SMTP connection with authentication. */ //Import the PHPMailer class into the global namespace use PHPMailer\PHPMailer\PHPMailer; //SMTP needs accurate times, and the PHP time zone MUST be set //This should be done in your php.ini, but this is how

PHPMailer can't connect to Gmail

北慕城南 提交于 2019-12-11 04:18:27
问题 So I've been scouring the web on this issue, and almost every example was condemned as a firewall or server related problem. From what I can tell, my server is connecting just fine to gmail, but PHPMailer still fails to connect. Here is my PHP: require_once($_SERVER['DOCUMENT_ROOT']."/phpmailer/class.phpmailer.php"); $host = "smtp.gmail.com"; $port = "587"; $checkconn = fsockopen($host, $port, $errno, $errstr, 5); if(!$checkconn){ echo "($errno) $errstr"; } else { echo 'Connected through