Mailcoach can send beautiful newsletters to your audience. In this blog post, I'd like to explain how we ensure that the CSS of our webpage does not break the layout of your newsletter.

Notice that the web-view Blade component receives the $webview variable, which contains the entire HTML contents of a sent newsletter.

And finally, we're setting the HTML of the shadow DOM to the HTML of the newsletter (contained in $html).

Using the shadow DOM, we can ensure that the sent newsletter we display is not affected by the layout of our website.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners