Outlook vs. non-Outlook content

SOLVED
Go to solution
MikeK19897
Regular Participant

Outlook vs. non-Outlook content

I need to be able to send content (a Call-To-Action button) for Outlook & non-Outlook email apps in the same email. It requires mail merge, so it must be XHTML, Custom-Code, Advanced editor.

 

The following code fails at the "if mso" line in Outlook:

 

<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml' xmlns:cctd='http://www.constantcontact.com/cctd'> 
<body>
<!--[if mso]>
This is OUTLOOK!
<![endif]-->
<span style='-webkit-text-size-adjust:none;mso-hide:all;'>This is NOT Outlook!</span>
</body>
</html>

How can I make this work?

 

(In actuality, the two different messages will display a button with links to our website, unique to each recipient.)

 

Thanks in advance,

Mike

1 ACCEPTED SOLUTION
MikeK19897
Regular Participant

So after working with Tier 2 Tech support for a few days, we finally hashed out a solution.

 

Instead of using "<Property name='SUBSCRIBER.CUSTOM.variable'/>" which must be used in XHTML custom code (which doesn't support "<!--[if mso]>" and "<![endif]-->"), simply use "$Subscriber.Custom.variable" in HTML (not XHTML) custom code (which DOES support "<!--[if mso]>" and "<![endif]-->").

 

<table border='0' cellspacing='0' cellpadding='0'>
 <tr>
  <td>
   <div>
	<!--[if mso]>
	<v:roundrect xmlns:v='urn:schemas-microsoft-com:vml' xmlns:w='urn:schemas-microsoft-com:office:word' 
		href="https://www.example.com/?PBL=$Subscriber.Custom.variable" 
		style='height:48px;v-text-anchor:middle;width:400px;' arcsize='10%' strokecolor='#2a73a3' fillcolor='#2a73a3'>
	<w:anchorlock/>
	<center style='color:#ffffff;font-family:Helvetica, Arial,sans-serif;font-size:22px;'>Join Now!</center>
	</v:roundrect>
	<![endif]-->

	<a><a style='width:400px;background-color:#2a73a3;border-radius:8px;color:#ffffff;display:inline-block;
		font-family:sans-serif;font-size:22px;line-height:48px; text-align:center;text-decoration:none;width:400px; 
		-webkit-text-size-adjust:none; mso-hide:all;' 
		href="https://www.example.com/?PBL=$Subscriber.Custom.variable" >Join Now!</a>
	</a>
   </div>
  </td>
 </tr>
</table>

View solution in original post

3 REPLIES 3
Caitlin_M
Administrator

Hello @MikeK19897. Thanks for coming into the Community! I apologize for the delay in our reply. It looks like you are working with a member of our upper level of support for your custom code email and they will be able to further assist you with your inquiry.


Caitlin M.
Community Manager
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.

You're not alone on your email marketing journey. Connect with a Marketing Advisor to see how they can help you develop the right strategy for your business and get the most out of your Constant Contact experience.
MikeK19897
Regular Participant

So after working with Tier 2 Tech support for a few days, we finally hashed out a solution.

 

Instead of using "<Property name='SUBSCRIBER.CUSTOM.variable'/>" which must be used in XHTML custom code (which doesn't support "<!--[if mso]>" and "<![endif]-->"), simply use "$Subscriber.Custom.variable" in HTML (not XHTML) custom code (which DOES support "<!--[if mso]>" and "<![endif]-->").

 

<table border='0' cellspacing='0' cellpadding='0'>
 <tr>
  <td>
   <div>
	<!--[if mso]>
	<v:roundrect xmlns:v='urn:schemas-microsoft-com:vml' xmlns:w='urn:schemas-microsoft-com:office:word' 
		href="https://www.example.com/?PBL=$Subscriber.Custom.variable" 
		style='height:48px;v-text-anchor:middle;width:400px;' arcsize='10%' strokecolor='#2a73a3' fillcolor='#2a73a3'>
	<w:anchorlock/>
	<center style='color:#ffffff;font-family:Helvetica, Arial,sans-serif;font-size:22px;'>Join Now!</center>
	</v:roundrect>
	<![endif]-->

	<a><a style='width:400px;background-color:#2a73a3;border-radius:8px;color:#ffffff;display:inline-block;
		font-family:sans-serif;font-size:22px;line-height:48px; text-align:center;text-decoration:none;width:400px; 
		-webkit-text-size-adjust:none; mso-hide:all;' 
		href="https://www.example.com/?PBL=$Subscriber.Custom.variable" >Join Now!</a>
	</a>
   </div>
  </td>
 </tr>
</table>

View solution in original post

Hello @MikeK19897. I'm so happy that our upper level of support was able to assist you! Thanks for updating us.


Caitlin M.
Community Manager
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.

You're not alone on your email marketing journey. Connect with a Marketing Advisor to see how they can help you develop the right strategy for your business and get the most out of your Constant Contact experience.