HTML emails4 users found helpful
$mh2 = Loader::helper('mail2'); $mh2->to($to); $mh2->from($from); $mh2->setSubject($subject); //send both and let email client decide $mh2->setBody($textBody); $mh2->setHtml($htmlBody); @$mh2->sendMail();
i just made custom mail templates, ;)
in tony's mail addon, he uses a stripped down tinymce so its easy to style,
mbone99, thank you very much for posting this great and easy to use solution.
To use it, just call the setBodyHTML() function. For example:
$mh = Loader::helper('mail'); $mh->to($to); $mh->from($from); $mh->setSubject($subject); $mh->setBody($textBody); $mh->setBodyHTML($htmlBody); @$mh->sendMail();
1) Copy this file:
2) Edit the new copy of the file, and change this line:
$body = t("
$bodyHTML = t("
3) Now you can edit the contents of the email to be HTML. Note that you might also want to define a plain old $body variable (if you want the email to have both HTML and plain text versions). Also, for the HTML email you'll probably want to change the line breaks in between each question/answer pair into <br /> tags (so on line 6, replace each "\r\n" with "<br />").
I tried this with concrete 188.8.131.52 but it doesn't work for me.
The email will be send but it has no content.
What im doing wrong?
Thanks for you reply.
I got it to work. There will be send an email.
But when i set a table to the block_form_submission.php like:
<TABLE> <TR> <TD> TEST </TD> </TR> </TABLE>
The form will hangs up.
After i click Submit, the screen turns white.
How can i format my HTML-Email?
Can i use normal HTML-Tags?
I've also done a pull request of this with no comments for ½ a year:
this is exactly where I was looking for.