corebos
corebos copied to clipboard
text in email to reduce spam
add a text version to outgoing emails in order to reduce spam count
the message template module has a text version which we should use if it is not empty, if it is empty or we are sending an email without a template you may be able to use this code:
$tplnothml=strip_tags(preg_replace(array("/<p>/i","/<br>/i","/<br\/>/i"),array("\n","\n","\n"),$content));
$message->addPart($tplnothml, 'text/plain');
but verify it, please
Hi, @joebordes Can you please point me to some documentation to help tackle this issue? I am willing to work on it.
Hi @shreyasbapat Thank you very much for your interest and offer :-)
You can get an idea of the underlying emailing infrastructure we have in place starting here
That should take you to the base email class where that "setMailerProperties" seems to be the one responsible for setting the email details in phpmailer.
Then the sendgrid class has the same "sendemail" method where this line seems to be the one that needs to be manipulated.
Start asking, I'll try to help as much as I can
Thanks @joebordes I am on it.