Forums

plain text email

sebslater 07 Nov, 2009
hello there,

I have set up a plain text email to be sent by a form - email is then converted to SMS by clickatell smtp api.
-----
user:xxxxxx
password:xxxxxx
api_id:xxxxxx
to:{mobile}
text:Hi {name}, thank you for registering
-----

but unfortunately when this email is sent by chrono forms it removes the 'to:' bit which means it doesn't get converted at the other end!!

Does anyone know how to fix this bug?

Thanks,


Seb Slater
nml375 07 Nov, 2009
Hi Seb,
I believe this is caused by a Joomla "feature" in the JMailHelper class. Roughly put, when you use the JMail class (as CF does), during the process of creating and sending a mail, the mail body will be "cleaned" by JMailHelper::cleanText(), which will remove any injected email headers from the body.
I believe the only way to avoid this, would be to completely avoid the JMail/JMailHelper classes, sending the mail manually using the mail() php function, or implementing your own mail sending function/class.

/Fredrik
sebslater 07 Nov, 2009
Thanks very much.

I deleted the |to:| in libaries/joomla/mail/helper.php line 50 and it now works fine.

Cheers!

Seb
GreyHead 09 Nov, 2009
Hi Seb,

FYI, there's a thread here with some info on using the RedIrect plugin to send to ClickaTell,

Bob
This topic is locked and no more replies can be posted.