phpmailer column loop & skip NULLs

I am trying to loop through 5 columns in a row to send an email with PHPmailer. Each row can contain up to 5 email addresses but not all do. My loop method works but if a NULL exists where no email address is available, the email does not get sent. How can I get my script to ignore NULLs. Also, is there a better loop process for Columns? include("conn.php"); require("class.phpmailer.php"); // require("class.smtp.php"); // require("class.pop3.php"); $conn = mssql_connect($server, $user, $pass) or die("ERROR: Connection to MYSERVER...Read more

phpmailer - body has been altered failure on DKIM validation

I'm using PHPMailer to send mails and like to append a DKIM-signature to mails. I had problems before I applied this patch. Now I'm able to send a successfull signed message to have successfully signed a message with less than 1500 characters in the body. If increase the character count (even with simple a's) The signature fails.I've correctly set up a TXT domain record.I guess it's because of the email's body cause if I use this service I always get a "wrong body hash" error.Signature in the email header looks like this one:DKI...Read more

PHPmailer works without asking for authentication

I am using PHPmailer() to send emails. However the mail gets sent even if I dont put in the senders address in the code. How does this work? Why the mail host does not ask for authentication? Below is the snapshot of code. I am not mentioning the mail host for security reasons. $mail->From = ''; $mail->Host = ''; $mail->Mailer = 'smtp';...Read more

phpmailer - Failed to connect to server: Connection refused (111)

I am using PHPMailer to send the smtp emails. If I use the same setting in a WordPress site, it works fine. But my priority is to use in a custom php page. And there, it is giving the following errorsSMTP ERROR: Failed to connect to server: Connection refused (111)SMTP connect() failed. Error: SMTP connect() failed. Code is here below<?phpini_set('display_errors', 1);ini_set('display_startup_errors', 1);error_report...Read more

phpmailer - Send an e-mail with html and text

I'm using Joomla's integrated version of PHPmailer to send an e-mail.I have already read this answer, but something is not working for me. An exception gets thrown at the AltBody line and the PHP fails to reach the Send line.By commenting out the AltBody line, the HTML version of my mail is sent and it works fine.I also used setBody instead of Body, because Body just doesn't work (from further reading done today I suspect that's because I used $mail->Body($msg) instead of $mail->Body = $msg, and "Body is an attribute, not a method", said ...Read more

phpmailer error with long email addresses

I run a list of subscribed webmasters and recently migrated to PHPMailer.I have my phpmailer script working fine. It takes values from my mysql database and send them an email but sometimes I get the Mailer Error: You must provide at least one recipient email address.After some tests, I found the error is displayed when the full email address is more than 82 characters.As you know, working with email address of webmasters of seo micro niche sites can give me lot of addresses with more than 82 characters since their domains are very long.Is ther...Read more

PHPMailer in combination with Gmail smtp sending mail twice

I have come across some weird behaviour in PHPMailer. I am using my gmail account for the SMTP settings. But every time PHP sends an e-mail(in this case, it's for resetting a password), I receive the same e-mail too. Except for when the password reset is requested for my gmail account.Here is the code;//set email settings $mail = new PHPMailer; $mail->IsSMTP(); // Set mailer to use SMTP $mail->Host = 'ssl://'; // Specify main and backup server ...Read more

phpmailer sends email but does not include attachment

I have the following code to send an email via phpmailer, it works fine if I don't include the AddAttachment line so know that all other constants and variables translate OK.$mail = new PHPMailer();$mail->IsSMTP();$mail->Host = EW_SMTP_SERVER;$mail->SMTPAuth = TRUE;$mail->Username = EW_SMTP_SERVER_USERNAME;$mail->Password = EW_SMTP_SERVER_PASSWORD;$mail->From = EW_SENDER_EMAIL;$mail->FromName = EW_SENDER_EMAIL;$mail->Subject = $mail_subject;$mail->Body = $mail_message;$mail->WordWrap = 50;$mail->AddAttachment($...Read more

WinServer 2012 r2 + PHP(wamp64) PHPMailer error “Could not instantiate mail function”

I tried all the steps which are prompted in win server 2012 r2 relates answer including its related answers and particular PHPMailer too.But still, I'm running with the same issue. Additionally, have checked about port 25 is running no firewall issue here.If anyone can help me, it's really appreciated.NOTE:Win server 2012 r2 relates answerPHPMailer answerserver fault answerThanksUPDATE//To test is via basic mail function/*mail("", "Test Subject", "Test Message");*///To Test via PHPMailer use PHPMailer\PHPMailer\PHPMaile...Read more

phpmailer - I am sending email with image. I have only the binary code. Is there any way to send it to email body?

If I use this code it shows me the image. But I want to send this in my email body. But inside the email body when I write this code it shows only the image tag with the binary code. How can I send this image as my email body image with the binary code? Is there any way to send this?I repeat I have only the binary code of Image.I am sending mail with phpmailer. <img src="data:image/png; base64, iVBORw0KGgoAAAANSUhEUgAAANIAAANBCAYAAAC ..." />...Read more

phpmailer - SpamAssassin negative score for HEADER_FROM_DIFFERENT_DOMAINS

Some emails sent by our sever go to spam for certain recipients. E.g when sent to email addresses.I have been testing our emails using https://www.mail-tester.comSpamAssassin gives a score of -0.1 for the issue of 'HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different'This is the only issue reported. Everything else, such as SPF and DKIM, passes. There is no documentation on their website for this issue and I don't understand what it means or how to fix it.The email is sent using PHPMailer via AWS...Read more

How can i get the correct "from" emailaddress, using PHPMailer and Google Apps?

I use a simple PHPMailer form to allow the users of my website to contact me through a contact form. I use my google apps account to send the mail. In the script i set the emailaccount the user provides me as the "from address".Until a few weeks ago, this went well. From Google Apps i could click on reply to send a reply to the user contacting me. However, recently, without changing anything in my code, when i click on reply, i send an email to myself. Is this something Google changed in its policy? Or did i maybe do something wrong incidentall...Read more

phpmailer - Limesurvey notification emails will not send

I've recently noticed an issue with my Limesurvey installation. Until recently, I had a number of surveys set to email the user after submission (using {email} in the "Send detailed admin notification email" box to refer to an email question in the survey). However despite not manually changing anything, they no longer send. Some others do send from within limesurvey, for example from the "Create new admin" option, while token related emails will not. In the case of token invitations, the debugging there will say emails sent when using php, but...Read more

phpmailer - Handling of List-Unsubscribe callbacks on server

When adding 'List-Unsubscribe' email headers, what kind of handling is required on the server-side for the callbacks? It's possible to add both a mailto-link and a web-link to the header, in PHPMailer it could look like this:$email->AddCustomHeader("List-Unsubscribe: <>, <$id>");But does the mailto-address have to somehow automatically handle the unsubscription, or is it okay if the request just goes to an inbox that is frequently c...Read more

Issue loading phpmailer 6.0

Having problem with upgrading phpMailer 5.xx to 6.0. Used several versions of phpmailer for years, no problems like this. I prefer to not use composer.From upgrade guide "Alternatively, if you're not using composer, copy the contents of the PHPMailer folder into one of the include_path directories specified in your PHP configuration and load each one manually." I prefer to not modify the include_path file on a shared host. I used the PHPMailerAutoload.php for my 5.xx versionsI used this from the 6.0 package:"Upgrading from PHPMailer 5.2 to 6.0I...Read more