How to make Mail break lines at X characters?

Hi!

Is there a way to have Mail automatically create linebreaks at a certain character length when composing an e-mail? It's a common request on many mailing lists to not send e-mails with longer lines than 80 characters.

Please help!

/roda

MBP 5,5, Mac OS X (10.6.2)

Posted on Nov 15, 2009 1:09 PM

Reply
9 replies

Nov 15, 2009 3:20 PM in response to rodachme

Mail uses format=flowed. It will automatically break the lines at less than 80 characters when the message is sent. And it re-wraps to the window width when received, which is why you don't normally notice. You should not attempt to control line length, since that will make a mess of the format when the lines get re-wrapped. See [http://joeclark.org/ffaq.html].

Feb 12, 2010 8:23 AM in response to rodachme

Seriously, this is the kind of ridiculous crap that loses customers. Mail.app is definitely the "stickiest" part of Mac OS X for many users, myself included. Screw that up and it becomes a lot easier for folks to start seriously considering alternatives.

So what's the skinny, Apple? You going to fix this, or what?

Mar 17, 2010 8:44 AM in response to rodachme

A coworker has the same issue. When he sends to another colleague that uses the command line mail app in Linux, the Linux user only sees one long line for each paragraph.

To (sort of) fix this in Snow Leopard, we created an Automator service that takes highlighted text, runs the Unix command line "fmt" command, and replaces the text with the wrapped text.

To do the same, start Automator and select the Service template. The first line has:

Service receives selected "text" in "any application"

Leave the first item as "text" and either leave "any application" or change it to "Mail.app".

Make sure Replaces selected text is highlighted.

Next, click on the Utilities icon under Actions. Drag the "Run Shell Script" icon to the right pane. Replace "cat" with "fmt -s -70" to wrap lines at 70 characters and collapse whitespace (multiple spaces, tabs) into a single space. If you do not want to collapse the spaces, leave out the "-s". Use Save as to name the new service.

Open System Preferences, select Keyboard and then Keyboard Shortcuts. Click on Services. Scroll down and find your new service. Click on the + at the bottom of the window. Select Application and choose Mail or all applications. Give it a name (I reused the same name as the service) and a shortcut.

To use it, highlight the text and press the keyboard shortcut. The text should reappear wrapped at 70 characters. If you edit some more and the lines no longer wrap correctly, just run it again.

Scott

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to make Mail break lines at X characters?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.