Simply mail with bootstrap

霸气de小男生 提交于 2021-01-29 12:43:00

问题


I have a simply mail I want to send

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css">
<div class="card">
  <div class="card-header">
    <nav class="navbar bg-primary">
      <a class=" navbar-brand " href="# ">
        <img alt=" " class="d-inline-block align-top " src="img/logo.png ">
      </a>
    </nav>
  </div>
  <div class="card-body ">
    <h5 class="card-title ">Welcome</h5>
    <p class="card-text ">To complete the registration you must click on the following link.</p>
    <button class="btn btn-primary" href="{{registrationURL}} ">
      Complete registration
    </button>
  </div>
</div>

but I read somewhere it's not possible to add the bootstrap directly in the email.... It's true or not?

I have tried in some clients and it's works, but I don't know if I will have problem with others.


回答1:


The email needs all the css to be included inside the html code for a good behavior not trying to get the css from external files. I recommend you to get the email template from MailChimp for example. You will notice that they put all the css code inside in the same template.

MailChimp templates take care to show properly the template in all browsers and also with Outlook program (still being very used).



来源:https://stackoverflow.com/questions/51420780/simply-mail-with-bootstrap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!