You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using phpmailer 6.5.3, i had gmail Gmail 552-5.7.0 error and using file_get_contents to get mail body , replace login details end send email via phpmailer.
Problem description
I'm using phpmailer 6.5.3, i had gmail Gmail 552-5.7.0 error and using file_get_contents to get mail body , replace login details end send email via phpmailer.
Code to reproduce
my message body was like $body = file_get_contents("https://www.mysite.com/template/email.html");
contents of email.html
Debug output
When i use file_get_contents over https://www.mysite.com/ phpmailer add some extra codes into body like that:
so this is strictly forbidden on gmail servers and i was getting the 552-5.7.0 error.
at the end i've solved problem that
replace file_get_contents("https://www.mysite.com/email/template.html");
with file_get_contents(DIR . "/email/template.html");
but my question is why php mailer adding this extra code into my e-mail body?
The text was updated successfully, but these errors were encountered: