corebos icon indicating copy to clipboard operation
corebos copied to clipboard

text in email to reduce spam

Open joebordes opened this issue 6 years ago • 3 comments

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

joebordes avatar Sep 29 '19 19:09 joebordes

Hi, @joebordes Can you please point me to some documentation to help tackle this issue? I am willing to work on it.

shreyasbapat avatar Sep 29 '19 19:09 shreyasbapat

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

joebordes avatar Sep 29 '19 21:09 joebordes

Thanks @joebordes I am on it.

shreyasbapat avatar Oct 07 '19 19:10 shreyasbapat