1

Is there a way to insert pure html into an email via Apple’s desktop Mail app (ie. creating a newsletter, tables, etc.)?

I know you’re able to do this on Mac OS via Thunderbird, just wondering if there’s a reliable method or extension for Apple Mail specifically.

  • The only progress I’ve made is to cmmd + a the whole html page or highlight html divs or tables and then cmmd + v that into a new email. Not perfect, but the only way I’ve been able to accurately add html tables. –  Jan 12 '18 at 01:59

4 Answers4

12

Having been seeking for solution for so long. Both cmd + a then cmd + c or cmd + i in Safari may drop some style/script. Occasionally I found a nealy perfect solution by myself.

  1. Create a new mail in apple "Mail.app", write anything then hit cmd + s.
  2. Find your draft at the left panel of "Mail.app". Drag it onto your desktop.
  3. Edit the draft file with any text editor you like. See some html source code at the bottom of the draft file? Replace them with the html code you want to send then save the file.
  4. Open "File" - "Import Mailboxes" in "mail.app". Select "Apple Mail", import the edited draft file.
  5. You will see your mail at the left panel of "Mail.app". Drag it into a "Draft" mailbox.
  6. Finally open the mail, fill in To, CC, Subject, etc, and send your pure HTML mail.
6

There is a "simple" way : open your html content in Safari, then press command + i

The html content of the page will be inserted in the body of a new mail message.

GuCier
  • 6,919
  • 1
  • 29
  • 36
  • I tried this before asking this question actually, I was having issues with font-size settings so I was looking for a more direct approach. Also, there’s a random bug that causes a black line to the right of the html content to appear is some email clients. –  Jan 12 '18 at 01:56
2

I was also looking for a solution and found this thread. Here is how I paste code into Apple Mail: Copy your code into the code beautifier at http://hilite.me/. Then save the generated HTML to a file and open that in Safari and Press command + i as Creaforge said (thanks for the tip).

Rado
  • 21
  • 2
0
To expand on what TheycallmeXiaoli said :
  1. Create a new mail in apple "Mail.app", write Bonjour then hit cmd + s.

  2. Find your draft at the left panel of "Mail.app". Drag it onto your desktop.

  3. Edit the draft file with any text editor you like (ex: TextEdit)

  4. Search for the word Bonjour you wrote earlier - Replace ONLY this Bonjour with your ENTIRE html code then save the file.

do not delete anything else ! don't replace the current HTML tag just the word Bonjour

  1. In the Mail App Select File -> Import Mail Boxes

Select "Apple Mail" & import the edited file.

  1. You will see your mail at the left panel of Mail App

most likely inside an "imported" folder

  • Drag the file into your "Draft" mailbox.

Finally open the mail, fill in To, CC, Subject, etc, and send your pure HTML mail.

: )

Thanks so much TheycallmeXiaoli !

Aristidios
  • 1,921
  • 2
  • 13
  • 24
  • What's the reason behind this note "Replace ONLY this Bonjour with your ENTIRE html code then save the file"? This will lead to nested `` & `` tags which is incorrect. – Mamouneyya Jul 30 '21 at 16:38
  • the reason is i tried the solution above & my html was messed up - while this method kept it intact – Aristidios Jul 30 '21 at 17:09
  • Mmm, would copying the styles applied to the original `body` tag by Mail fix it for you? Or probably there's a problem with your html that this hack indirectly fixes it? I haven't had any issues with replacing the whole html so far. – Mamouneyya Jul 30 '21 at 17:48
  • No issues with my HTML - replacing the whole HTML works but just not as good - my Htmls supports dark mode for example which did not work replacing the whole html - i’m talking about Apple Mail here – Aristidios Jul 30 '21 at 19:16