It will only work on the "vanilla" versions of Gmail, which are ones that never implemented media query support. So if you include it, it will force the desktop version on these vanilla gmail app versions while being ignored by the app versions that support media queries.
@Maggie Ellis within the main container of your email. I normally put it in the very bottom. Make sure the width values are in sync.
In your internal styles:
.gmailFix, .gmailFix img { display:none !important; } /* Gmail App layout hack, pre-media query support */
<!-- main containing table-->
<table width="600" align="center" cellpadding="0" cellspacing="0" style="margin:0 auto;">
<tr><td class="gmailFix">
<img src="spacer.gif" width="600" height="1" style="display:block;width:600px;min-width:600px;min-height:1px;max-height:1px;"/>
</tr></td>
</table>
The reason is because of the MSO-only code on line 421. If you remove it, the gap disappears.
<!--[if mso]></td><td valign="top" style="border-spacing:0;border-collapse:collapse;mso-table-lspace:0;mso-table-rspace:0;"><![endif]-->
Quick note: You two doctypes in your markup.
You could be flagged for spam for a myriad of reasons. Check the Litmus spam test results to see what failed. If something in the report doesn't make sense and there is no explanation, your best friend is google. But without seeing the actual email code or the spam results, I'm not able to tell you anything.
I'm troubleshooting a similar background issue for my own email, and I copied your code above to see if it would work, and it does not. I have Outlook 2.1.203. Have you tried sending this button to yourself recently and testing again?
One thing: Are you sending yourself an email to an @outlook.com account to the Outlook app on Android, or are you sending to a non-outlook/non-hotmail/non-live email account? I sent this test to a @outlook.com and @gmail.com account, and it works as expected on the @gmail.com account.
Gmail launched an update around September 30th, 2016, and since then, media queries are supported. The version launched around that time was 6.9.11.134426830, so if you have this version or any updates since then, you should see responsive emails for Gmail accounts on both 5.1.1 and 6.0. If you use Gmail to view non-gmail account (such as yourname@outlook.com), your emails will not display responsively-this is the screenshot from "Gmail App IMAP(Android)" in Litmus. I'm not quite sure which email app is being used for screenshots from "Android 5.1" and "Android 6.0" - they don't display responsively. In fact, they look like how my emails used to display until adding in the image hack (using multiple non-breaking spaces and wrapping in a div with nowrap white-spacing) to force the "full width" version.
I'm trying to recreate this issue to help you troubleshoot. So far I'm not able to. I have images disabled so that I can preview the alt text for all my images. But I think it's because I still use inline CSS in addition to internal styles (the styles placed in the <head>). I believe this is why when I enable images to load, I don't have these issues.
I suggest continuing to use inline styles in addition to internal styles. One reason is that there are users who use the gmail app to view non-gmail account emails. For example, I have both a hotmail.com and an outlook.com email for QA, and I use the android gmail app as part of my QA process for testing. What happens for these non-gmail accounts is that the internal styles are completely stripped, so if there are no inline styles listed, the email doesn't have any styling.
For some reason, Litmus uses non-gmail accounts on for testing on Android 5.1 and 6.0. I set up four accounts for the gmail app on both an Android 5.1 and 6.0 phone: A gmail account, my own domain email hosted by gmail, and a non-gmail account (both a hotmail.com and outlook.com account). The background image does display on the gmail and domain hosted accounts, whereas the background image does not display on the non-gmail accounts.
It should also be noted that gmail/domain hosted accounts support media queries, while non-gmail accounts do not; I believe they stripe the <style>
definitions from the email.