HTML email conditional statement for Apple mail

Hello fellow programmers

Currently i have been working on creating some email newsletters, and i have experienced some errors, which only occur in Apple Mail 5. As i have already used conditional statements for targeting Outlook specifically, i was wondering if the same was possible with Apple Mail 5 ?

FYI: Apple Mail 6 works like a charm.

Answers


Unfortunately there is no Apple 5 conditional statement, however there is usually an alternative method to doing most things code-wise.

Outlook conditionals aside, the only things you have to play with are the style sheet css (ignored by Gmail etc) and media queries (able to target specific devices).


You can't use conditional code to target Apple Mail, but it does render media queries.

So you could use something like this to target Apple Mail:

<style type="text/css">
@media only screen and (min-device-width: 601px) {
.style {color: #666666!important;}
}
</style>

This would target only those devices that can display the full-with email AND media queries (which, at present, is a grand total of one client: Apple Mail).


Need Your Help

Want to design a printer friendly website; anything I should keep in mind?

html css

I want to design a website with a bunch of content, and I want that content to be printer friendly. So basically just the content. No navigation, no ads, no nothing. I'm planning on creating two

Print in swift doesn't terminate by \n

ios swift printing bluetooth

I am working with Bluetooth on iOS 9 with Xcode 7, swift 2.