Email template code alteration

More
1 month 2 weeks ago #180118 by LouisGac
email template editor -> show source code

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #180119 by Elita
really? try that yourself!!

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #180121 by LouisGac
so, here the function to send mail:
github.com/LimeSurvey/LimeSurvey/blob/ma...mon_helper.php#L2199

As you can see here:
github.com/LimeSurvey/LimeSurvey/blob/ma...lper.php#L2310-L2314
if ($ishtml) {
        $mail->IsHTML(true);
        if (strpos($body, "<html>") === false) {
            $body = "<html>".$body."</html>";
        }

If HTML mail is enable, and if the source code of the mail does not contain the string "<html>", then the function add it.
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #180122 by Elita
thanks. so back to my initial question:
How to add to the HTML head this:
1. <!DOCTYPE> should be the first element seen
2. the <head> tag must contain a title

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #180123 by LouisGac
If your mail body contains the string "<html>" then the function will not change it.
So, as I told you 2 messages up, use "show source" button, and add your header and code in the mail...
The following user(s) said Thank You: tpartner

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago - 1 month 2 weeks ago #180136 by Elita
nope. my email does not contain nothing. i used limesurvey built - in invitation email with what i got that error.
so. if i added proper head to the "email body" as you named it in the template editor using code editor, there will not be another head generated by the built-in script?
if so, do you think that is the proper way of handling this?
Last edit: 1 month 2 weeks ago by Elita.

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #180137 by jelo
Replied by jelo on topic Email template code alteration

Elita wrote: if i added proper head to the "email body" as you named it in the template editor using code editor, there will not be another head generated by the built-in script?

You can provide a complete HTML page as email via the sourcemode of the editor.
As long as your HTML source contains the <HTML> tag, LimeSurvey will not add it's own stuff during generating emails.
You cannot edit the HTML stuff LimeSurvey generates, you can override it with your own html sourcecode.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: DenisChenu, Elita, LouisGac

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #180199 by Elita
Thank you all for your time!

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!