Search 1.9 billion lines of Odoo code on GitHub

mail_inline_css

Author: Akretion, Odoo Community Association (OCA)
License: AGPL-3
Branch: 10.0
Repository: BT-fgarbely/social
Dependencies: mail
Languages: PO File (124, 62.0%), Python (30, 15.0%), and reStructuredText (46, 23.0%)
Other branches: 11.0, 12.0, 13.0, and 13.0-mig-mail_outbound_static
Other repositories: 2FM/social, ACCOMODATA-BVBA/social, AITIC/social, AdriaGForgeFlow/social, Alfa-90/social, BADEP/social, BT-scchmid-test/social, BeopenMX/social, Bubbles-IT/social, CB-Gran-Canaria/social, Callino/social, Change2improve/social, CompassionCH/social, Digital5-Odoo/social, Dobtor-OCA/social, DucTruongKomit/social, ERPLibre/social, ForgeFlow/social, Gabinete-Digital/social, Glue-Software-Engineering-AG/social, ITISAG-OCA/social, Ingeos/social, Jarsa/social, JazziMc/social, Judystudy/social, Kiplangatdan/social, KomarovAlea/social, MathBenTech/social, MediaJockey/social, NL66278/social, NeatNerdPrime/social, NextERP-Romania/social, Nooka10/social, OCA-MUK/social, OCA/social, ORETEK/social, OpencloudPro/social, QubiQ/social, RLeeOSI/social, Rad0van/social, SDIsl/social, SanteLibre/social, SequarSrl/social, SeuMarco/social, SimoRubi/social, SolutionSeekers/social, StefanRijnhart/social, Studio73/social, Syci-Consulting/social, TDu/social, TRESCLOUD/social, Tecnativa/social, Tonow-c2c/social, Vauxoo/social, VisiionSolucionesTecnologicas/social, VitalPet/social, YogeshMahera-SerpentCS/social, aaltinisik/social, acsone/social, adhoc-dev/social, agenterpgmbh/social, agrista/odoo-social, ajaniszewska-dev/social, akretion/social, anhvu-sg/social, ansinaesmejor/social, antonyrajserpentcs/social, apetbiz/social, aurestic/social, avoinsystems/social, bealdav/social, bishalgit/social, bitroniq/social, brain-tec/social, brainbeanapps/social, camptocamp/social, cedvict/social, celm1990/social, coopiteasy/social, crnd-inc/social, cunguito/social, dajuayen/social, daramousk/social, denislour/social, diagramsoftware/social, diegobgl/social, diggy128/social, dndoanh/social, dozymoe/social, druidoo-dev/social, eLBati/social, eezee-it/social, emagdalenaC2i/social, ermannognan/social, ernestotejeda/social, eslammohamed13/social, etobella/social, eugentaga/social, exosoftware/oca-social, extrememicro/social, fmdl/social, focusate/oca-social, gab-net/social, gfcapalbo/social, git-service-it-ar/social, grindtildeath/social, gurneyalex/social, hbrunn/social, hibou-io/oca-social, hinfo506/social, i-vyshnevska/social, iRichGit/social, igallart/social, iledarn/social, imranissufo/social, inforconseil/social, inspiredbusiness/social, jacky82669513/social, jerrodmartin/social, jobiols/oca-social, kevin070982/social, legalsylvain/social, leonidasthe300/social, lincersolucoes/oca-social, manuelcalerosolis/social, marcozink/social, marionumza/social, masiunas/social, mavs2011bs/social, mechsoftdigital/social, mgielissen/social, modoolar/social, moltisinc/social, mozaik-association/social, mpanarin/social, myceliandre/social, nilshamerlinck/social, niulinlnc/social, noorealam96/social, odoogap/social, odoonz/social, osiell/social, p-tombez/social, pegonzalezspesol/social, popama/social, pscloud/social, redblow/social, redcor/social, rlizana/social, rsullivan2704/social, rubensben/social, ruuter/social, sadeqamin/social, sanube/social, scbrianti/social, semamca35/social, sergiocorato/social, sewisoft/social, shiram/social, simahawk/social, skeller1/social, solarprocurement/social, sschmid-test-org/social, steingabelgaard/social, sunflowerit/social, sygel-technology/social, tafaRU/social, takinobori/oca-social, takobi-online/social, tbaden/social, tegin/social, tfossoul/social, thinkwelltwd/social, thomaspot/social, tirma-sa/social, tosink/social, tschanzt/social, ursais/social, valmarnet/social, versada/social, x0rzkov/odoo-social, xavidj/social, xcgd/social, xduran/social, y2gsmith/social, yusniermatos/social, and zestsoftware/social

<a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.svg"> </a> <a name="mail-inline-css"></a> <h2>Mail Inline CSS</h2> <p>When you send HTML emails you can't use style tags but instead you have to put inline <code>style</code> attributes on every element. So from this:</p> <pre> <code lang="html">&lt;html&gt; &lt;style type=&quot;text/css&quot;&gt; h1 { border:1px solid black } p { color:red;} &lt;/style&gt; &lt;h1 style=&quot;font-weight:bolder&quot;&gt;Peter&lt;/h1&gt; &lt;p&gt;Hej&lt;/p&gt; &lt;/html&gt;</code> </pre> <p>You want this:</p> <pre> <code lang="html">&lt;html&gt; &lt;h1 style=&quot;font-weight:bolder; border:1px solid black&quot;&gt;Peter&lt;/h1&gt; &lt;p style=&quot;color:red&quot;&gt;Hej&lt;/p&gt; &lt;/html&gt;</code> </pre> <p>This module use premailer library to do this.</p> <p>It parses an HTML page, looks up <code>style</code> blocks and parses the CSS. It then uses the <code>lxml.html</code> parser to modify the DOM tree of the page accordingly.</p> <a name="installation"></a> <h3>Installation</h3> <p>To install this module, you need first to install <cite>premailer</cite> python library with:</p> <pre> <code lang="bash">pip install premailer</code> </pre> <a name="usage"></a> <h3>Usage</h3> <p>Just use any mail template as Odoo standard feature</p> <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/205/10"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a> <p>Note:</p> <blockquote> Odoo with module web_editor already implements this feature on the client side (js). This module brings this server side feature for cases without js part. It could the more stable way over the Odoo versions with a stable api in a dedicated library with adhoc python unit tests.</blockquote> <a name="bug-tracker"></a> <h3>Bug Tracker</h3> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback.</p> <a name="credits"></a> <h3>Credits</h3> <a name="images"></a> <h4>Images</h4> <ul class="simple"> <li>Odoo Community Association: <a class="reference external" href="https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg">Icon</a>.</li> </ul> <a name="contributors"></a> <h4>Contributors</h4> <ul class="simple"> <li>David BEAL &lt;<a class="reference external" href="mailto:david.beal&#64;akretion.com">david.beal&#64;akretion.com</a>&gt;</li> </ul> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="funders"></a> <h4>Funders</h4> <p>The development of this module has been financially supported by:</p> <ul class="simple"> <li>Akretion</li> </ul> <a name="maintainer"></a> <h4>Maintainer</h4> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>This module is maintained by the OCA.</p> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>To contribute to this module, please visit <a class="reference external" href="https://odoo-community.org">https://odoo-community.org</a>.</p>