]> diplodocus.org Git - nmh/blobdiff - man/mhlogin.man
new.c: Order two return statements to match comment.
[nmh] / man / mhlogin.man
index 32a61ec08768f5ca9b6c18878e374b171d20db31..13a040aa3dcd8b8a8aa0fd6bb91d9e138d2a9868 100644 (file)
@@ -1,13 +1,17 @@
-.\"
+.TH MHLOGIN %manext1% 2016-10-10 "%nmhversion%"
+.
 .\" %nmhwarning%
-.\"
-.TH SEND %manext1% "March 24, 2016" "%nmhversion%"
+.
 .SH NAME
-mhlogin \- login to external (OAuth) services
+mhlogin \- nmh login to external (OAuth) services
 .SH SYNOPSIS
 .HP 5
 .na
 .B mhlogin
+.RB [ \-help ]
+.RB [ \-version ]
+.RB [ \-user
+.IR username ]
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-authservice
@@ -15,13 +19,13 @@ mhlogin \- login to external (OAuth) services
 .RB [ \-browser
 .IR command ]
 .RB [ \-snoop ]
-.RB [ \-version ]
-.RB [ \-help ]
 .ad
 .SH DESCRIPTION
-.B Mhlogin
+.B mhlogin
 currently only supports OAuth for Gmail.  Run
 .B mhlogin
+.B \-user
+.I username
 .B \-saslmech xoauth2
 .B \-authservice
 .I gmail
@@ -32,6 +36,7 @@ prompt.  Be sure to use the same account with the
 .B -user
 switch to
 .BR send .
+See the EXAMPLES section below for an example.
 .PP
 The
 .B \-browser
@@ -58,6 +63,29 @@ which specifies where
 should write credentials and where
 .B send
 should read them.
+.SH "EXAMPLES"
+.PP
+.SS Gmail
+First, login to the Gmail account that you want to use, e.g, user@example.com,
+using a web browser.
+Then, enter a
+.B mhlogin
+command such as:
+.PP
+.RS
+.nf
+mhlogin -user user@example.com -saslmech xoauth2 -authservice gmail \
+-browser 'google-chrome --new-window'
+.fi
+.RE
+.PP
+The
+.I username
+should be a complete email address.
+Respond to the prompt in the browser window, then copy and paste the
+authorization code in response to the
+.B mhlogin
+prompt.
 .SH "PROFILE COMPONENTS"
 .fc ^ ~
 .nf