Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Hi,

I've been looking for this everywhere in both the documentation and forum posts to no avail.

Is there a way to customize the email output of the form submission?

Thanks
Rudy
Hi Rudy,

If by customizing the email output, you meant making it HTML formatted (as opposed to the plain-text used by Couch) - I am afraid, currently that is not natively possible.

If I did not get the question right please let me know.

Thanks
Hi KK, thanks for the quick reply.

You answered the question correctly.

How about formatting the plain text, in terms of line breaks, labelling the field names et al?

Currently, the first couple of lines of the text email output is not aligned to the left. I just want to be able to tidy it up a little bit.

Thx
Rudy

See screenshot:
Screen Shot 2013-12-15 at 9.26.33 AM.png
Email output screen shot
Screen Shot 2013-12-15 at 9.26.33 AM.png (55.21 KiB) Viewed 2137 times
OK, I see the problem.

The rectification is pretty simple -
you see, cms:send_mail outputs everything contained within its opening and closing tags with *full fidelity* - that is to say it will also include any space characters, tabs, line-breaks etc. that might be present in the enclosed content.

What you are seeing in the mail are these enclosed whitespace/line-breaks characters.
Please experiment a little with trying to remove these spaces and you'll find that the mail will look *exactly* the way the text appears on your template.

Hope this helps.
Hi KK,

Thanks for the suggestion. The spacing came from all the indentation in my template code. After removing the spaces, the email output looks fine now.

Cheers
Rudy
You are welcome :)
6 posts Page 1 of 1