Skip to content

jamderfab/apple-mail-html-horizontal-divider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Apple Mail HTML Horizontal Divider Hack

Insert a clean, HTML, horizontal line into Apple Mail messages using a clever HTML signature trick — because <hr> tags get stripped by default.


Why This Hack Works

Apple Mail’s composer is a Rich Text editor, not an HTML editor. It aggressively strips or mangles raw HTML like <hr> to preserve layout integrity.

But the Signature feature allows limited HTML.

By creating a blank signature, editing its underlying .mailsignature file, and locking it, you can sneak in clean HTML that renders as a full-width divider.


Step-by-Step Guide

1. Create a Placeholder Signature in Mail

  • Open Mail.app.

  • Go to Mail > Settings > Signatures.

  • Click + to create a new signature and name it: Divider.

  • Clear all content in the signature box — including invisible line breaks.

  • Drag the Divider signature onto one of your accounts (middle column → left column).

  • With the account selected (left column), set Divider as the default signature in the dropdown at the bottom.

  • Quit Mail.app completely.


2. Locate the Email Signature File (.mailsignature)

  • Open Finder, then press Cmd + Shift + G.

  • Enter the following path:

    ~/Library/Mail/V*/MailData/Signatures
  • V* may be V9, V10, etc., depending on your macOS version.

  • Look for a recently modified file ending in .mailsignature. The filename will be a long, cryptic string.


3. Edit the .mailsignature File in Plain Text

  • Right-click the .mailsignature file → Open with TextEdit.

  • Go to Format > Make Plain Text (or press Shift + Cmd + T).

  • Leave the metadata lines (lines 1–6) intact. Delete everything below and paste this:

    <div style="border-top: 1px solid #cccccc; margin: 20px 0;"></div>
  • Save the file.

  • Right-click the file again → Select Get Info → Check the Locked box.

  • Close both Get Info and TextEdit.


4. Use Your Divider

  • Reopen Mail.app.

  • Compose a new message.

  • Place your cursor where you want a horizontal line.

  • From the Signature dropdown, select Divider.

Et voilà — you now have a clean, full-width horizontal line that you can insert anywhere in your emails, as many times as needed.


Optional: Example File

Check the included DividerExample.mailsignature for reference.

Replace the metadata with your own Mail-generated content. Only use the <div> line below the metadata.


About

Use an HTML signature to insert a responsive, full-width, horizontal divider into Apple Mail messages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published