cURL / Mailing Lists / curl-users / Single Mail

curl-users

Possible issue with SMTP/TLS or SMTP/SSL

From: Jaya Kumar <jayakumar.alsa_at_gmail.com>
Date: Wed, 6 Nov 2013 15:56:21 +0800

Hi Curl friends,

First of all, thanks for all the work on curl. It is a very useful tool.

I've been experimenting with sending email from scripts using curl. It
works great when the setup uses gmail. However, I have not been able
to make it work using hotmail. Here's what I'm doing:
$ curl --ssl-reqd --mail-from "testaccount_at_hotmail.com" --mail-rcpt
"jayakumartest_at_gmail.com" --url smtp://smtp.live.com:587 --upload-file
/tmp/mail.txt --user "testaccount_at_hotmail.com:testpassword" -v
--insecure
* About to connect() to smtp.live.com port 587 (#0)
* Trying 65.55.96.11... % Total % Received % Xferd Average
Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:--
--:--:-- 0connected
* Connected to smtp.live.com (65.55.96.11) port 587 (#0)
  0 0 0 0 0 0 0 0 --:--:-- --:--:--
--:--:-- 0< 220 BLU0-SMTP238.phx.gbl Microsoft ESMTP MAIL Service,
Version: 6.0.3790.4675 ready at Tue, 5 Nov 2013 23:40:42 -0800
> EHLO mail.txt
< 250-BLU0-SMTP238.phx.gbl Hello [123.45.67.89]
< 250-TURN
< 250-SIZE 41943040
< 250-ETRN
< 250-PIPELINING
< 250-DSN
< 250-ENHANCEDSTATUSCODES
< 250-8bitmime
< 250-BINARYMIME
< 250-CHUNKING
< 250-VRFY
< 250-TLS
< 250-STARTTLS
< 250 OK
> STARTTLS
< 220 2.0.0 SMTP server ready
* successfully set certificate verify locations:
* CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSLv3, TLS handshake, Finished (20):
{ [data not shown]
* SSL connection using RC4-MD5
* Server certificate:
* subject: C=US; ST=Washington; L=Redmond; O=Microsoft Corporation;
CN=*.hotmail.com
* start date: 2013-04-24 20:35:09 GMT
* expire date: 2016-04-24 20:35:09 GMT
* subjectAltName: smtp.live.com matched
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Organization
Validation CA - G2
* SSL certificate verify ok.
> EHLO mail.txt
  0 0 0 0 0 0 0 0 --:--:-- 0:00:02
--:--:-- 0< 250-BLU0-SMTP238.phx.gbl Hello [124.13.200.194]
< 250-TURN
< 250-SIZE 41943040
< 250-ETRN
< 250-PIPELINING
< 250-DSN
< 250-ENHANCEDSTATUSCODES
< 250-8bitmime
< 250-BINARYMIME
< 250-CHUNKING
< 250-VRFY
< 250-AUTH LOGIN PLAIN XOAUTH2
< 250 OK
> AUTH PLAIN d2lzZXJ0ZXN0aW5nQGhvdG1haWwuY29tAHdpc2VydGVzdGluZ0Bob3RtYWlsLmNvbQBAdGVzdG1nbWFpbC5jb20=
  0 0 0 0 0 0 0 0 --:--:-- 0:00:03
--:--:-- 0< 535 5.0.0 Authentication Failed
* Authentication failed: 535
> QUIT
* response reading failed
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
} [data not shown]

curl: (67) Authentication failed: 535

The password is correct so it seems like an unexpected error.

So a quick question before I struggle further, has anyone been
successful using curl to send mail using hotmail? If possible, would
you mind sharing the command line or test C program?

Thanks,
jaya
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-11-06