<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<article lang="en" id="git-imap-send(1)">
<articleinfo>
    <title>git-imap-send(1)</title>
        <indexterm>
                <primary>git-imap-send(1)</primary>
        </indexterm>
</articleinfo>
<simplesect id="_name">
<title>NAME</title>
<simpara>git-imap-send - Send a collection of patches from stdin to an IMAP folder</simpara>
</simplesect>
<simplesect id="_synopsis">
<title>SYNOPSIS</title>
<simpara><emphasis>git imap-send</emphasis></simpara>
</simplesect>
<simplesect id="_description">
<title>DESCRIPTION</title>
<simpara>This command uploads a mailbox generated with <emphasis>git-format-patch</emphasis>
into an IMAP drafts folder.  This allows patches to be sent as
other email is when using mail clients that cannot read mailbox
files directly.</simpara>
<simpara>Typical usage is something like:</simpara>
<simpara>git format-patch --signoff --stdout --attach origin | git imap-send</simpara>
</simplesect>
<simplesect id="_configuration">
<title>CONFIGURATION</title>
<simpara>To use the tool, imap.folder and either imap.tunnel or imap.host must be set
to appropriate values.</simpara>
<simplesect id="_variables">
<title>Variables</title>
<variablelist>
<varlistentry>
<term>
imap.folder
</term>
<listitem>
<simpara>
        The folder to drop the mails into, which is typically the Drafts
        folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
        "[Gmail]/Drafts". Required to use imap-send.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
imap.tunnel
</term>
<listitem>
<simpara>
        Command used to setup a tunnel to the IMAP server through which
        commands will be piped instead of using a direct network connection
        to the server. Required when imap.host is not set to use imap-send.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
imap.host
</term>
<listitem>
<simpara>
        A URL identifying the server. Use a <literal>imap://</literal> prefix for non-secure
        connections and a <literal>imaps://</literal> prefix for secure connections.
        Ignored when imap.tunnel is set, but required to use imap-send
        otherwise.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
imap.user
</term>
<listitem>
<simpara>
        The username to use when logging in to the server.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
imap.password
</term>
<listitem>
<simpara>
        The password to use when logging in to the server.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
imap.port
</term>
<listitem>
<simpara>
        An integer port number to connect to on the server.
        Defaults to 143 for imap:// hosts and 993 for imaps:// hosts.
        Ignored when imap.tunnel is set.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
imap.sslverify
</term>
<listitem>
<simpara>
        A boolean to enable/disable verification of the server certificate
        used by the SSL/TLS connection. Default is <literal>true</literal>. Ignored when
        imap.tunnel is set.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="_examples">
<title>Examples</title>
<simpara>Using tunnel mode:</simpara>
<literallayout class="monospaced">[imap]
    folder = "INBOX.Drafts"
    tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2&gt; /dev/null"</literallayout>
<simpara>Using direct mode:</simpara>
<literallayout class="monospaced">[imap]
    folder = "INBOX.Drafts"
    host = imap://imap.example.com
    user = bob
    pass = p4ssw0rd</literallayout>
<simpara>Using direct mode with SSL:</simpara>
<literallayout class="monospaced">[imap]
    folder = "INBOX.Drafts"
    host = imaps://imap.example.com
    user = bob
    pass = p4ssw0rd
    port = 123
    sslverify = false</literallayout>
</simplesect>
</simplesect>
<simplesect id="_bugs">
<title>BUGS</title>
<simpara>Doesn&#8217;t handle lines starting with "From " in the message body.</simpara>
</simplesect>
<simplesect id="_author">
<title>Author</title>
<simpara>Derived from isync 1.0.1 by Mike McCormack.</simpara>
</simplesect>
<simplesect id="_documentation">
<title>Documentation</title>
<simpara>Documentation by Mike McCormack</simpara>
</simplesect>
<simplesect id="_git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
</simplesect>
</article>
