Emailing an HTML File
With a little help from Safari, you can e-mail an HTML file to others — either as the body of the message, or as an attachment.
Sending an HTML file as a Message Body
With this approach, recipients will see the rendered content of your page as the message body. You just have to ensure that any stylesheets, images, or other resource files that your HTML file depends on will be accessible to those who receive the message. If they aren’t, recipients won’t see the email as you intended it.
TypeMetal’s bundled stylesheets don’t reference any image files or other resources, so they’re suitable for using for emails as long as you embed a copy as described in the following steps.
To e-mail an HTML file that you have open in TypeMetal, sending it as the message body:
- Ensure that a copy of the HTML file’s stylesheet, if any, is embedded in the HTML file. Recipients won’t be able to see a stylesheet that’s referenced on your local system. In the stylesheet picker’s menu, use the “Embed Copy in Document” command.
- Save the HTML file.
- Choose File → Open in Safari (Command+Option+Control+P) to open the HTML file in a Safari window or tab.
- In the just-opened Safari window or tab, choose “Email this Page” (Command+I) — from either the toolbar’s Share button, or from the File → Share submenu. This should open a new message composition window in Mail.
- Review the email, address it, and Send.
Don’t forget to make sure that any images and other such files that your HTML references are available where you referenced them! (For example, if your HTML document contains <img>
elements that reference their src
files via an “http://
” URL, make sure to remember to upload the referenced image files to your Web server, if they aren’t already there!) This will help ensure that recipients see your email as you intended.
Sending an HTML FIle as an Attachment
This approach is no different than sending any other file as an attachment, but is worth mentioning as an alternative that may sometimes be desirable.
If you want people to receive your HTML file as a file attachment, instead of as inline rendered HTML in the message body (perhaps because you’re exchanging an HTML file you’re collaborating on), simply drag the file — from either the document icon in a TypeMetal HTML Window title bar, or from a Finder window — into the content area of a Mail message composition window.