问题
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