2

I have a problem regarding apple's macOS email program.

I use PHPMailer for my website to send my users emails for confirmation, information, etc.

These emails are styled with css and look nice in most email programs I tested before. But apple's macOS email program seems to change the colours of everything the email contains.

The emails are mostly styled in black and white colors and those both colours just switch. The orange parts are shown quite fine.

I use a function in function.php to create the parts of the email which stays the same and just define the changing parts in the first script.

The css statements are intag - statements like the example below.

<p style = "color: white; background-colour: black;">xxx</p>

Like I said this looks like it should in most programs. Just in Apple's macOS email program ONLY IN DARK MODE!!! the Colors change. Is there any way to stop this?

Thanks for your help in advance!

Jazzschmidt
  • 989
  • 12
  • 27

2 Answers2

3

Apple have changed their behaviour now, in that they'll default to light mode (no change) if there's an image.

Having said that, if this changes, all you need to do is let them know that you only support light mode. You do that by adding this <meta> tag in the <head> section:

<meta name="color-scheme" content="light only">
<meta name="supported-color-schemes" content="light only">

However, as of right now, Gmail and Outlook on Mac will ignore this, and you'll have the same 'problem' in those programs.

Instead of thinking of it as a problem, understand that is some people's personal preference: just like some people prefer to read their emails on mobile phones so you should be making emails responsive.

Nathan
  • 4,358
  • 2
  • 10
  • 26
0

Looks like that's simply by design – macOS Mail in dark mode attempts to make the email dark all-in-all, and when it senses you're doing white-on-black (inverted colours, as it were), it inverts them so they match the otherwise white-on-black scheme it uses in dark mode.

There is an option in Mail that'd probably revert your mails' look to how they were before:

To use a light background for email messages while Dark Mode is turned on, open Mail and choose Mail > Preferences, then click the Viewing tab and deselect ”Use dark backgrounds for messages.”

Of course that won't help you much, but there's a decent-looking article about dark mode here, which might help:

AKX
  • 152,115
  • 15
  • 115
  • 172
  • 1
    thanks. But when I used bootstrap to style my email, black and white Colors don't get inverted. So I thought there is maybe some line of code I can include into my email. Some css statement or so? –  Apr 12 '19 at 06:58
  • @Chri2000R Did you find solution? – rendom Jul 10 '19 at 05:04
  • unluckily not so far. @rendom –  Aug 22 '19 at 19:32