Can we use Bootstrap to design Apache FreeMarker email template in Spring MVC project -


i want design email template in spring mvc project , using apache freemarker template send email content.

newuserregrequest.ftl (email template file in resource folder)

<html><head> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"/> </head> <body>     <h2>hi,</h2>     <h3>new registration bidmanager development</h3>     <div>         first name : ${bmusermodel.firstname}         last name  : ${bmusermodel.lastname}         country    : ${bmusermodel.country}     </div>     <pre><a class="btn btn-default" href="https://stackoverflow.com/">accept</a>   <a class="btn btn-default" href="https://stackoverflow.com/">reject</a></pre> </body></html> 

i have used bootstrap button classes don't know should keep css library (it's eclipse dynamic web project). below how have configured email server.

spring-servlet.xml

<!-- start: email configuration --> <beans:bean id="bmregmailsender" class="org.springframework.mail.javamail.javamailsenderimpl">     <beans:property name="host" value="${bm.smtp.hostname}"></beans:property>     <beans:property name="port" value="${bm.smtp.port}"></beans:property>     <beans:property name="username" value="${bm.smtp.username}"></beans:property>     <beans:property name="password" value="${bm.smtp.password}"></beans:property>     <beans:property name="defaultencoding" value="${bm.defaultencoding}"></beans:property>     <beans:property name="javamailproperties">         <beans:props>             <beans:prop key="mail.transport.protocol">${bm.transport.protocolname}</beans:prop>             <beans:prop key="mail.smtp.auth">${bm.smtp.authorization}</beans:prop>             <beans:prop key="mail.smtp.starttls.enable">${bm.smtp.tls}</beans:prop>             <beans:prop key="mail.debug">${bm.mail.debug}</beans:prop>             <!-- <beans:prop key="mail.smtp.ssl.enable">${bm.smtp.ssl}</beans:prop> -->         </beans:props>     </beans:property> </beans:bean> <beans:bean id="bmfreemarkerconfig" class="org.springframework.ui.freemarker.freemarkerconfigurationfactorybean">     <beans:property name="templateloaderpath" value="classpath:/templates/"></beans:property> </beans:bean> <!-- end: email configuration --> 

when send email, how looks in yahoo mail - enter image description here

i want show below - enter image description here answer acceptable if there alternate way design freemerker template (except inline styling). please ignore button text. appreciated. thanks!!!

email similar looking, different beast html5. there email clients support html5 , css3.

it depends on how want email on different clients. of popular email clients use <style> block in header. declared not wish use inline styles, means email not in outlook. looking buttons without inline styles going huge challenge have noticed yahoo mail.

i appreciate enthusiasm, don't think have full grasp on aggravating complexities of email development.

good luck.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -