In general, submitting patches should be done via the send-email command in the git suite or via a
git pull request. However, if both options are not possible for whatever reasons, you might want to send patches via your MUA (Mail User Agent).
Here we will deal with Thunderbird, but most of this guide is true for other MUAs, too.
First, disable HTML e-mails. Especially patches should not be sent via an HTML e-mail but in a paintext
mail for various reasons.
To disable HTML mails in Thunderbird, go to Options|Format. Select "Plain Text Only" from the messages menu and hit "OK" to save the settings. Thunderbird should now send e-mails in plaintext.
Most MUAs automatically cut the input text off and start a new line (this is called "line wrapping").
While this feature might be useful for normal e-mails, it destroys the patches you want to send in
since you cannot make line breaks anywhere in souce code files.
Therefore it is strongly recommended to disable line wrapping. In Thunderbird, go to the advanced
settings page (reachable via Tools|Options|Advanced|General|Config editor) and set
mailnews.wraplength to "0". This disables line wrapping in plaintext e-mails completely. (Thanks to
Matthias Fischer for sending me the working solution here.)
If you want to be able to disable line-wrapping only for a single mail, you can use a plugin.
If you are using PGP, setting the mode to "PGP/MIME" in order to prevent the PGP code block being added to the patch you are sending in is recommended. That way, the PGP signature will be placed in an separate attachment and not in the body of the e-mail.
To do so if you are using Enigmail, open the account settings and head to "OpenPGP security". Select "Use PGP/MIME by default" and hit "OK" in order to apply the settings.
Your MUA should now be ready to send in patches without line breaks, PGP signatures in the mail body etc. Before sending in patches like crazy now, please see the Submitting Patches guidelines about how to create and send in patches.