Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 1 | git-imap-send(1) |
| 2 | ================ |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 6 | git-imap-send - Send a collection of patches from stdin to an IMAP folder |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 12 | 'git imap-send' |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 13 | |
| 14 | |
| 15 | DESCRIPTION |
| 16 | ----------- |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 17 | This command uploads a mailbox generated with 'git format-patch' |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 18 | into an IMAP drafts folder. This allows patches to be sent as |
| 19 | other email is when using mail clients that cannot read mailbox |
Junio C Hamano | ef8fbf9 | 2010-04-04 19:12:02 | [diff] [blame] | 20 | files directly. The command also works with any general mailbox |
| 21 | in which emails have the fields "From", "Date", and "Subject" in |
| 22 | that order. |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 23 | |
| 24 | Typical usage is something like: |
| 25 | |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 26 | git format-patch --signoff --stdout --attach origin | git imap-send |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 27 | |
| 28 | |
| 29 | CONFIGURATION |
| 30 | ------------- |
| 31 | |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 32 | To use the tool, imap.folder and either imap.tunnel or imap.host must be set |
| 33 | to appropriate values. |
| 34 | |
| 35 | Variables |
| 36 | ~~~~~~~~~ |
| 37 | |
| 38 | imap.folder:: |
| 39 | The folder to drop the mails into, which is typically the Drafts |
| 40 | folder. For example: "INBOX.Drafts", "INBOX/Drafts" or |
| 41 | "[Gmail]/Drafts". Required to use imap-send. |
| 42 | |
| 43 | imap.tunnel:: |
| 44 | Command used to setup a tunnel to the IMAP server through which |
| 45 | commands will be piped instead of using a direct network connection |
| 46 | to the server. Required when imap.host is not set to use imap-send. |
| 47 | |
| 48 | imap.host:: |
| 49 | A URL identifying the server. Use a `imap://` prefix for non-secure |
| 50 | connections and a `imaps://` prefix for secure connections. |
| 51 | Ignored when imap.tunnel is set, but required to use imap-send |
| 52 | otherwise. |
| 53 | |
| 54 | imap.user:: |
| 55 | The username to use when logging in to the server. |
| 56 | |
Junio C Hamano | 4cfa536 | 2009-04-18 23:01:01 | [diff] [blame] | 57 | imap.pass:: |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 58 | The password to use when logging in to the server. |
| 59 | |
| 60 | imap.port:: |
| 61 | An integer port number to connect to on the server. |
| 62 | Defaults to 143 for imap:// hosts and 993 for imaps:// hosts. |
| 63 | Ignored when imap.tunnel is set. |
| 64 | |
| 65 | imap.sslverify:: |
| 66 | A boolean to enable/disable verification of the server certificate |
| 67 | used by the SSL/TLS connection. Default is `true`. Ignored when |
| 68 | imap.tunnel is set. |
| 69 | |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 70 | imap.preformattedHTML:: |
| 71 | A boolean to enable/disable the use of html encoding when sending |
| 72 | a patch. An html encoded patch will be bracketed with <pre> |
| 73 | and have a content type of text/html. Ironically, enabling this |
| 74 | option causes Thunderbird to send the patch as a plain/text, |
| 75 | format=fixed email. Default is `false`. |
| 76 | |
Junio C Hamano | 4aa0bcc | 2010-03-03 05:13:12 | [diff] [blame] | 77 | imap.authMethod:: |
| 78 | Specify authenticate method for authentication with IMAP server. |
| 79 | Current supported method is 'CRAM-MD5' only. |
| 80 | |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 81 | Examples |
| 82 | ~~~~~~~~ |
| 83 | |
| 84 | Using tunnel mode: |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 85 | |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 86 | .......................... |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 87 | [imap] |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 88 | folder = "INBOX.Drafts" |
| 89 | tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null" |
| 90 | .......................... |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 91 | |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 92 | Using direct mode: |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 93 | |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 94 | ......................... |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 95 | [imap] |
Junio C Hamano | 5cf43ca | 2008-08-20 09:14:14 | [diff] [blame] | 96 | folder = "INBOX.Drafts" |
| 97 | host = imap://imap.example.com |
| 98 | user = bob |
| 99 | pass = p4ssw0rd |
| 100 | .......................... |
| 101 | |
| 102 | Using direct mode with SSL: |
| 103 | |
| 104 | ......................... |
| 105 | [imap] |
| 106 | folder = "INBOX.Drafts" |
| 107 | host = imaps://imap.example.com |
| 108 | user = bob |
| 109 | pass = p4ssw0rd |
| 110 | port = 123 |
| 111 | sslverify = false |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 112 | .......................... |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 113 | |
| 114 | |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 115 | EXAMPLE |
| 116 | ------- |
| 117 | To submit patches using GMail's IMAP interface, first, edit your ~/.gitconfig |
| 118 | to specify your account settings: |
| 119 | |
| 120 | --------- |
| 121 | [imap] |
| 122 | folder = "[Gmail]/Drafts" |
| 123 | host = imaps://imap.gmail.com |
| 124 | user = user@gmail.com |
| 125 | port = 993 |
| 126 | sslverify = false |
| 127 | --------- |
| 128 | |
| 129 | You might need to instead use: folder = "[Google Mail]/Drafts" if you get an error |
| 130 | that the "Folder doesn't exist". |
| 131 | |
| 132 | Once the commits are ready to be sent, run the following command: |
| 133 | |
| 134 | $ git format-patch --cover-letter -M --stdout origin/master | git imap-send |
| 135 | |
| 136 | Just make sure to disable line wrapping in the email client (GMail's web |
| 137 | interface will wrap lines no matter what, so you need to use a real |
| 138 | IMAP client). |
| 139 | |
Junio C Hamano | ec3b9a7 | 2009-02-13 08:45:52 | [diff] [blame] | 140 | CAUTION |
| 141 | ------- |
| 142 | It is still your responsibility to make sure that the email message |
| 143 | sent by your email program meets the standards of your project. |
| 144 | Many projects do not like patches to be attached. Some mail |
| 145 | agents will transform patches (e.g. wrap lines, send them as |
| 146 | format=flowed) in ways that make them fail. You will get angry |
| 147 | flames ridiculing you if you don't check this. |
| 148 | |
| 149 | Thunderbird in particular is known to be problematic. Thunderbird |
| 150 | users may wish to visit this web page for more information: |
| 151 | http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email |
| 152 | |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 153 | SEE ALSO |
| 154 | -------- |
| 155 | linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5) |
| 156 | |
Junio C Hamano | 883d843 | 2006-04-06 23:15:39 | [diff] [blame] | 157 | GIT |
| 158 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 159 | Part of the linkgit:git[1] suite |