Insert a clean, HTML, horizontal line into Apple Mail messages using a clever HTML signature trick — because <hr>
tags get stripped by default.
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.
-
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.
-
Open Finder, then press
Cmd + Shift + G
. -
Enter the following path:
~/Library/Mail/V*/MailData/Signatures
-
V*
may beV9
,V10
, etc., depending on your macOS version. -
Look for a recently modified file ending in
.mailsignature
. The filename will be a long, cryptic string.
-
Right-click the
.mailsignature
file → Open with TextEdit. -
Go to
Format > Make Plain Text
(or pressShift + 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.
-
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.
Check the included DividerExample.mailsignature
for reference.
Replace the metadata with your own Mail-generated content. Only use the
<div>
line below the metadata.