Blog

You can now hide parts of your email from webviews

Email marketing is an essential aspect of any online business, and ensuring that your messages can be displayed correctly to your subscribers is crucial.

Fortunately, Mailcoach has made this easier by automatically generating a webview for your email campaigns or automation emails. This feature comes in handy when users have limited email clients that fail to display the email correctly.

To link to the webview, Mailcoach provides a placeholder {{ webviewUrl }}, which you can easily integrate into your email template. Here’s an example of what a campaign could look like:

<html>
	<body>
		<span>Is this email not displaying correctly? <a href="{{ webviewUrl }}">View online version</a></span>
		
		<div>
			... The rest of your email content
		</div>
		
		<a href="{{ unsubscribeUrl }}">Unsubscribe</a>
	</body>
</html>

Hiding parts of the email

With Mailcoach’s newest feature, the webview link and the unsubscribe link can be hidden from the generated webviews of your emails. By wrapping anything you want to hide inside … tags, you can control what is displayed in the webview. For instance, you can format the email above like this:

<html>
	<body>
		<!-- webview:hide -->
		<span>Is this email not displaying correctly? <a href="{{ webviewUrl }}">View online version</a></span>
		<!-- /webview:hide -->

		<div>
			... The rest of your email content
		</div>
		
		<!-- webview:hide -->
		<a href="{{ unsubscribeUrl }}">Unsubscribe</a>
		<!-- /webview:hide -->
	</body>
</html>

By doing so, you ensure that only the essential content of the email is displayed in the webview and your email looks polished and professional.

Ready to get started?