vert-x3/vertx-mail-client

Send email to postmaster failed

gaol opened this issue · 0 comments

gaol commented

According to https://tools.ietf.org/html/rfc5321#section-2.3.5:

The reserved mailbox name "postmaster" may be used in a RCPT command without domain
qualification (see Section 4.1.1.3) and MUST be accepted if so used.

And https://tools.ietf.org/html/rfc5321#section-4.1.1.3:

rcpt = "RCPT TO:" ( "<Postmaster@" Domain ">" / "" / Forward-path ) [SP Rcpt-parameters] CRLF

the "Postmaster" string shown above is treated as case-insensitive

we should support sending email to postmaster without domain qualification, however, it fails with the following exception:

   java.lang.IllegalArgumentException: invalid email address
	at io.vertx.ext.mail.mailencoder.EmailAddress.<init>(EmailAddress.java:77)
	at io.vertx.ext.mail.mailencoder.Utils.encodeEmailList(Utils.java:177)
	at io.vertx.ext.mail.mailencoder.MailEncoder.createHeaders(MailEncoder.java:177)
	at io.vertx.ext.mail.mailencoder.MailEncoder.encodeMail(MailEncoder.java:132)