Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ehloCmd method is not run when Mail Server reply "ESMTP" is not all uppercase characters #46

Closed
leotu opened this issue Nov 3, 2015 · 3 comments
Assignees
Labels

Comments

@leotu
Copy link

@leotu leotu commented Nov 3, 2015

SMTPInitialDialogue#isEsmtpSupported(String message)
use message.contains("ESMTP") to check message, but some mail server return is "Esmtp".
e.g. "220 smtp.qq.com Esmtp QQ Mail Server"

P.S, using javamail is no problem when reply is

"Esmtp" String.

-------------- below is java mail debug log ------------
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "smtp.exmail.qq.com", port 25, isSSL false
220 smtp.qq.com Esmtp QQ Mail Server
DEBUG SMTP: connected to host "smtp.exmail.qq.com", port: 25

EHLO 192.168.10.96
250-smtp.qq.com
250-PIPELINING
250-SIZE 73400320
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN
250-MAILCOMPRESS
250 8BITMIME
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg "73400320"
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
DEBUG SMTP: Found extension "AUTH=LOGIN", arg ""
DEBUG SMTP: Found extension "MAILCOMPRESS", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
DEBUG SMTP: AUTH LOGIN command trace suppressed
DEBUG SMTP: AUTH LOGIN succeeded
DEBUG SMTP: use8bit false
MAIL FROM:leo@xxx.com
250 Ok
RCPT TO:tuwl@xxx.com
250 Ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP: tuwl@xxx.com
DATA
354 End data with .
Date: Tue, 3 Nov 2015 20:54:50 +0800 (CST)
From: leo@xxx.com
To: tuwl@xxx.com
Message-ID: 406026067.0.1446555290122@LeoMacBook.local
Subject: this is the plain message text mail
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

this is the plain message body !
.
250 Ok: queued as
DEBUG SMTP: message successfully delivered to mail server
QUIT
221 Bye

@leotu leotu changed the title ehloCmd method may not be run when not "ESMTP" uppercase string ehloCmd method may not be run when Mail Server reply "ESMTP" not all uppercase characters Nov 4, 2015
@alexlehm alexlehm self-assigned this Nov 15, 2015
@alexlehm

This comment has been minimized.

Copy link
Contributor

@alexlehm alexlehm commented Nov 15, 2015

this was mostly a hack to avoid sending EHLO to a server that doesn't support it (which is not very common anymore I guess), I will change it to use a case-insensitive check

@alexlehm alexlehm changed the title ehloCmd method may not be run when Mail Server reply "ESMTP" not all uppercase characters ehloCmd method is not run when Mail Server reply "ESMTP" is not all uppercase characters Nov 15, 2015
alexlehm added a commit to alexlehm/vertx-mail-client that referenced this issue Nov 15, 2015
…y "ESMTP" is not all uppercase characters

moved isEsmtpSupported to Utils class, added unit test for the Utils method and a test in HeloTest
regenerated docs and generated js files

Signed-off-by: alexlehm <alexlehm@gmail.com>
@alexlehm

This comment has been minimized.

Copy link
Contributor

@alexlehm alexlehm commented Nov 15, 2015

fixed the issue and added a unit test to check it

Pull request: #47

@alexlehm alexlehm added ready to review and removed in progress labels Nov 15, 2015
alexlehm added a commit that referenced this issue Nov 16, 2015
fix issue #46: ehloCmd method is not run when Mail Server reply "ESMTP" is not all uppercase characters
@alexlehm

This comment has been minimized.

Copy link
Contributor

@alexlehm alexlehm commented Nov 16, 2015

resolved by #47

@alexlehm alexlehm closed this Nov 16, 2015
@alexlehm alexlehm removed the to review label Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.