Mail accepting html

Permalink 1 user found helpful
Hello there and thanks for reading.

I'm having a bit of a problem understanding how to send a mail, accepting html. I have been looking in concrete5 html helper file, but without succes. Does anyone know the best way to set up mail accepting html in concrete5?

Best regards

 
jordanlev replied on at Permalink Reply
jordanlev
Are you trying to SEND html emails, or RECEIVE html emails?
Hkofoed replied on at Permalink Reply
I am trying to send email
jordanlev replied on at Permalink Reply
jordanlev
See example #4:
http://php.net/manual/en/function.mail.php...

Here's a brief tutorial that also talks about the difference between sending from a windows vs. unix server:
http://www.quackit.com/php/tutorial/php_mail.cfm...

And if that doesn't suit you, you could try loading the phpmailer library yourself and sending it that way, for example:
http://stackoverflow.com/questions/1850618/problems-sending-html-em...

Good luck!
Hkofoed replied on at Permalink Reply
Thanks for your help:-) I will look into it right away:-)

Best regards

Henrik
Hkofoed replied on at Permalink Reply
Hello again.

I just solved my problem by making a change in the mail helper class. I have changed $mail->setBodyText method in line 189 to $mail->setBodyHtml. I know it's off grounds to edit in the core files, but for now it will do.
jordanlev replied on at Permalink Reply
jordanlev
Cool!
Note that you can copy the mail helper class to your site's "helpers" folder, and then in the file rename the class like this:
class SiteMailHelper extends MailHelper  {

Then make the changes there. It will be used by your site and will not get overwritten if you ever update concrete5.
Hkofoed replied on at Permalink Reply
Perfect...thanks:-)
bryanlewis replied on at Permalink Reply
bryanlewis
Does this work with version 5.4.1.1? I need to do this and i'm having trouble with it.
codingpenguins replied on at Permalink Reply