phpmailer

Disable PHPMailer error messages

↘锁芯ラ 提交于 2019-11-29 07:21:43
How do I disable the error messages from the PHPMailer class? I'm displaying my own error messages and I don't want users to see errors such as "SMTP Error: Could not connect to SMTP host." My code: http://pastie.org/1497819 Thanks This is not probably the best solution, but it works. In your phpmailer library folder open "class.phpmailer.php", find public function Send() inside it comment the line echo $e->getMessage()."\n"; I know this thread is old and already answered but I stumbled here because I had the same problem but ending up solving it differently so I thought I'd share. NOTE: I'm

Setting up PHPMailer with Office365 SMTP

折月煮酒 提交于 2019-11-29 06:29:15
I am attempting to set up PHPMailer so that one of our clients is able to have the automatically generated emails come from their own account. I have logged into their Office 365 account, and found that the required settings for PHPMailer are: Host: smtp.office365.com Port: 587 Auth: tls I have applied these settings to PHPMailer, however no email gets sent (The function I call works fine for our own mail, which is sent from an external server (Not the server serving the web pages)). "host" => "smtp.office365.com", "port" => 587, "auth" => true, "secure" => "tls", "username" => "clientemail

Make PHPmailer a “more secure app” for Gmail

雨燕双飞 提交于 2019-11-29 04:12:59
What security can we implement in PHPmailer to make it a more secure app for Gmail? https://support.google.com/accounts/answer/6010255 I am using PHPmailer to send emails via Gmail. PS: I don't want to enable "access for less secure apps" here: https://www.google.com/settings/security/lesssecureapps , I want to make the app more secure. Gmail has started imposing a new authentication mechanism that substitutes SMTP athentication for OAuth2-based authorisation. The docs on their changes can be found here . This doens't really improve security much because ultimately you still need to submit

How can i attach an image using Phpmailer?

旧巷老猫 提交于 2019-11-29 01:37:42
I am using phphmailer and have attached an image, it shows only the image like an icon rather than image itself here is my code could you help. $mail->AddEmbeddedImage('2.jpg', '2img', '2.jpg'); $mail->Subject = "Order Form: Contact form submitted"; $mail->Body = $body . 'img src="../../photo/2img" ; note: i have dropped html tag befor img as I get error sending this Q. Gabriel Sosa Per PHPMailer Manual , you sould use the method AddEmbeddedImage $mail->AddEmbeddedImage(filename, cid, name); By using this function with this example's value above, results in this code: $mail->AddEmbeddedImage(

Mail not sending with PHPMailer over SSL using SMTP

浪尽此生 提交于 2019-11-28 22:01:53
I am trying to use PHPMailer to send e-mails over SMTP but so far have had no luck. I've gone through a number of SO questions, PHPMailer tutorials and forum posts but still cannot get it to work. I'll document as many of my failed attempts as I can remember to save time, but firstly here is the code I am using: <?php session_start(); error_reporting(E_ALL); ini_set('display_errors','On'); require('includes/class.phpmailer.php'); include('includes/class.smtp.php'); $mail = new PHPMailer(); $name = $_POST["name"]; $guests = $_POST["guests"]; $time = $_POST["time"]; $message = "<h1>".$name." has

Send mail in phpmailer using DKIM Keys

柔情痞子 提交于 2019-11-28 18:48:24
Currents i am using phpmailer to send mail's. now how its possible to send email in phpmailer with DKIM keys i search in phpmailer Class file and i found the below code /** * DKIM selector. * @type string */ public $DKIM_selector = ''; /** * DKIM Identity. * Usually the email address used as the source of the email * @type string */ public $DKIM_identity = ''; /** * DKIM passphrase. * Used if your key is encrypted. * @type string */ public $DKIM_passphrase = ''; /** * DKIM signing domain name. * @example 'example.com' * @type string */ public $DKIM_domain = ''; /** * DKIM private key file path

Gmail Sending Limits

和自甴很熟 提交于 2019-11-28 18:22:01
I'm developing software on a website that uses PHPMailer to send mail through our company's Gmail accounts via SMTP. With the software, a customer signs up for the site and receives a receipt and a video ticket. Two separate emails per customer at sign up. Then, before the event starts we want to resend all the video tickets. I was wondering what the limits were about sending emails. How many emails can we send per minute, per hour, per day via SMTP using PHPMailer? Thanks. UPDATE: We are using Google Apps for business Ok, I contacted Google directly to get the answer and here is their reply:

PHPMailer with GMail: SMTP Error

隐身守侯 提交于 2019-11-28 13:55:49
I am making use of PHPMailer to send mail through GMail. The code I use is straight from a tutorial and it works perfectly on my laptop. However, testing this on a Windows 2003 Server - it seems to always return an SMPT error: SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host. Here is the settings I use in PHPMailer: include("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // use ssl $mail->Host = "smtp.gmail.com"; // GMAIL's SMTP server

PHPmailer gmail 'from' is gmail account

好久不见. 提交于 2019-11-28 12:49:37
I'm trying to send a mail with PHPmailer and gmail. But when I send a mail its from my gmail account instead of no-reply. How do I set no-reply as from? Code I have: $mail = new PHPMailer(); $mail->Mailer = "smtp"; $mail->Host = "ssl://smtp.gmail.com"; $mail->Port = 465; $mail->SMTPAuth = true; $mail->Username = "myAccount@web.com"; $mail->Password = "password"; $mail->From = "no-reply@web.com"; $mail->AddAddress($to); $mail->AddReplyTo("no-reply@web.com","no-reply"); $mail->Subject = $subject; $mail->Body = $msg; $mail->WordWrap = 150; $mail->send(); The mail I get receives (headers): Return

Phpmailer using smtp with Gmail not working - connection timing out

☆樱花仙子☆ 提交于 2019-11-28 12:39:12
I've looked into the following links: phpmailer send gmail smtp timeout send email using Gmail SMTP server through PHP Mailer http://uly.me/phpmailer-and-gmail-smtp/ ...and tried to implement for myself a combination of those however...most of the time it sends this message... Message could not be sent. Mailer Error: SMTP connect() failed. However there was one time where it sent this when I experimented between "tls" and "ssl"... SMTP ERROR: Failed to connect to server: Connection timed out (110) SMTP connect() failed. Message could not be sent. Mailer Error: SMTP connect() failed. My code is