This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: email to gmail using /usr/bin/email


On Sat, Jan 26, 2013 at 6:32 PM, Renà Berber <> wrote:
>
> On 1/26/2013 2:53 PM, JJ wrote:
>>
>> I have spent several hours looking for tips on using the email binary in
>> Cygwin to send email via Gmail from the command line.  The man page and help
>> output donât seem to clarify this.  I seem to be timing out or not
>> connecting to the gmail smtp server, but I donât get any errors from email,
>> even with the âV flag.  It just hangs at:
>>
>> Connecting to server smtp.gmail.com on port 465
>
>
> Wrong port.
>
>
>> Greeting the SMTP server...
>> ...
>> Here is the command I am using in my script.  This worked fine when I used
>> another ISP, but gmail is pickier.
>>
>> email -r smtp.gmail.com -f <user>@gmail.com -n me -s "backup for %DATE%" -a
>> d:\backup.log <sameuser>@gmail.com
>>
>> I ran email-config and specified my userid, password, smtp server, port
>> number, and to use TLS.  I have also specified the port and used the tls
>> flag in the command line.  Sending email from outlook on the same computer
>> works fine.
>
>
> With the same settings? I doubt it.
>
>
>> Any documentation on email with SSL or tips on alternatives would be greatly
>> appreciated.
>
>
> Read the help pages on Gmail.
> --
> Renà Berber



Actually 465 works fine.  Although I'm not entirely sure it is
actually TLS.  It will not work with the starttls parameter on openssl
as it just stalls but would take the connection normally.

Connection Log: http://pastebin.com/2vd3S7rL

Anyways try without defining TLS for that port and if you can just
indicate it as normal SSL.  Alternatively check the Gmail docs for the
correct TLS port (which isn't 465).  This is a configuration issue at
this point and not entirely relevant to cygwin.

P.S. - I just noticed that it appears to be ssmtp so there is no
"normal" SSL in the config.  You will need to use the actual TLS port
and not 465 in this config.  However 465 does work and likely works
fine in Outlook.
(*Resending as I forgot to change to plain text mode >.<)

Robert Pendell
A perfect world is one of chaos.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]