Hello Serge, Yes, I guess your record is consider text so it is quoted... You seems to have find a solution, but you may have a look at XML() it gonna manage escaping and encoding for you... About the other field, if you keep going with you "manual" html tag (without using the web2py helpers) you better stick to it since you already have html formatted text content.
You mention firefox, why's that if you send mail?? Are you just send a link by mail to a user for him to access your content from you web site?? Good Luck Richard On Wed, Jun 21, 2017 at 8:44 AM, Serge Bourgeois <[email protected] > wrote: > Finally, I could find the solution to my first question. It is in fact > very esay. > > Here is my receipe: > > Assuming that the content of the text field is in your local variable > my_text_field_content, simply put this in the 'message' variable of the > MAIL() function from gluon.tools: > > message = (my_text_field_content, '<html>' + my_text_field_content + > '</html>') > > All the other variables must of course been filled in as usual. > > Hoping this can help some members of the community, > > Serge > > 2017-06-21 8:08 GMT+02:00 Serge Bourgeois <[email protected]>: > >> >> >> Le mardi 20 juin 2017 18:24:43 UTC+2, Serge Bourgeois a écrit : >>> >>> >>> I like web2py for the good balance between simplicity and completeness. >>> Most of the time, when I have a question, I can find a response googeling. >>> Today not... >>> >>> I could cope with attachments, but I'm still struggling with rich text >>> fields for the email body. Using BeautifulSoup.BeautifulSoup(my_field).text >>> removes the tags, but the result is not accceptable. >>> >>> So, if there is a helper, I could not find it (or not use it properly). >>> 1. With Mail().send, how to fill the 'message' parameter from a text >>> field (let's say my_field) filled in via the ckeditor widget (which allows >>> also to incluse a mail address or a URL). >>> 2. After getting a response to this first question, if I want to append >>> let's say 2 text fields, I 'm gonna try SPAN(my_first_text_field, BR(), >>> my_second_text_field). Will this work? >>> >>> Thanks in advance for any advice. >>> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit https://groups.google.com/d/to >> pic/web2py/c1l7rXcJtJ8/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

