0

I am using PHPMailer to send email to my users, the thing is that the last time i used this feature, that would be 2 months ok everything was ok, the emails were getting into the inbox of users and in the Security Details the Mailed By and Signed By parameters were taken manually by me.

Right now, when i try to use this mailing system, all the emails are getting into the spam folder in gmail and in Security Details the Mailed By shows the host details.

How can i fix this issue? What do you recommend?

erimeri
  • 181
  • 1
  • 3
  • 17
  • 1
    Have you tried setting SMTP settings from your host, inside the PHPMailer config? – Woodrow Apr 25 '18 at 17:51
  • I've dealt with a bit of email troubleshooting. Spam filters sometimes look at things like reverse DNS and that kind of thing when checking whether or not an email should be trusted. So, it's quite complicated and a lot is going on when looking at whether or not an email will go to spam. The best thing to do is to use SMTP to send the email as mentioned above. This is quite a complex question, dependent on many variables. – adprocas Apr 25 '18 at 17:54
  • In the Security Details, in the Mailed By it's showing my Reverse DNS from host, previously it showed a parameter that i put. How could it be to behave like this without changing the code at all? – erimeri Apr 25 '18 at 17:56
  • $mail = new PHPMailer(true); $mail->isMail(); $mail->Host = $host; $mail->SMTPAuth = true; $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 587; $mail->setFrom($from, $title); $mail->AddReplyTo("");$mail->addAddress($to, $username); $mail->Subject = $subject; // Set email format to HTML $mail->Body=$bodycontent; $mail->IsHTML(true); $mail->AltBody = 'This is the alternate body'; $mail->send(); – erimeri Apr 26 '18 at 19:10

0 Answers0