Reputation: 915
Hy, I try to send mail throught an smtp server. It works fine with normal connection but when i try to use ssl with gmail. It makes a strange problem.
- [180.882] [RECV] 220 smtp.inmail24.com ESMTP extMailer (smtp)
- [180.882] [SEND] EHLO localhost
- [181.156] [RECV] 250-smtp.inmail24.com
- [181.156] [RECV] 250-PIPELINING
- [181.156] [RECV] 250-SIZE 13631488
- [181.156] [RECV] 250-ETRN
- [181.156] [RECV] 250-STARTTLS
- [181.156] [RECV] 250-AUTH LOGIN PLAIN
- [181.156] [RECV] 250-AUTH=LOGIN PLAIN
- [181.156] [RECV] 250-ENHANCEDSTATUSCODES
- [181.156] [RECV] 250-8BITMIME
- [181.156] [RECV] 250 DSN
- [181.164] [SEND] AUTH PLAIN "The auth plain"
- [181.742] [RECV] 235 2.7.0 Authentication successful
- [181.75] [SEND] MAIL FROM:
- [182.023] [RECV] 250 2.1.0 Ok
- [182.031] [SEND] RCPT TO:
- [182.195] [RECV] 250 2.1.5 Ok
- [182.195] [SEND] DATA
- [182.304] [RECV] 354 End data with .
- [182.304] [SEND] From: [email protected]
- [182.304] [SEND] Message-ID:
- [182.312] [SEND] To: [email protected]
- [182.312] [SEND] Subject: Test mail without SSL - 2011-11-09 07:31:34
- [182.312] [SEND] Date: Wed, 09 Nov 2011 07:31:56 GMT-0400
- [182.312] [SEND]
- [182.312] [SEND] TestMessage
- [182.32] [SEND] .
- [182.453] [RECV] 250 2.0.0 Ok, id=28522-10, from MTA([127.0.0.1]:10027): 250 2.0.0 Ok: queued as 2537340E254E
- [182.453] [SEND] QUIT
- [182.515] [RECV] 221 2.0.0 Bye
But when i trying to use smtp with gmail and ssl
- SSL:->CH
- SSL:<-SH
- SSL:<-SC
- SSL:<-SHD
- SSL:->CKE
- SSL:->CCS
- SSL:->F
SSL:<-F
[RECV] 220 mx.google.com ESMTP jb5sm6904507lab.15
- [SEND] EHLO localhost:465
and no recv message :( Just a timeout after a few second
I use j2me because i make this app for blackberry Thanks for replys :)
Upvotes: 0
Views: 267
Reputation: 596497
You do not need to include a port number after the hostname in your EHLO
command. Once you have established a connection and received the 220
greeting successfully, you do not have to do anything different in your commands then you were previously doing.
With that said, you might consider using port 587 with the STARTTLS
command instead. TLS is more secure than SSL, and STARTTLS
allows you to query the server to make sure it supports SSL/TLS before you activate it.
Upvotes: 2