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

SMTP protocol: error in function rcpt ? #41

Closed
michalbundyra opened this issue Jan 15, 2020 · 1 comment
Closed

SMTP protocol: error in function rcpt ? #41

michalbundyra opened this issue Jan 15, 2020 · 1 comment

Comments

@michalbundyra
Copy link
Member

Hi,
First: sorry if my english is not perfect :-)

In my company, a project (currently in development) is using Zend\Mail with SMTP protocol to send email

When a mail is sent with multiple recipients (to, cc and bcc), the SMTP server checks email addresses, return a error code 550 5.1.1 if one doesn't exists and a exception is thrown by Zend\Mail\Protocol\Smtp => and the email is not send at all

BUT, in RFC (RFC 2821), it is said:

The second step in the procedure is the RCPT command.
RCPT TO: [ SP ]

The first or only argument to this command includes a forward-path
(normally a mailbox and domain, always surrounded by "<" and ">"
brackets) identifying one recipient. If accepted, the SMTP server
returns a 250 OK reply and stores the forward-path. If the recipient
is known not to be a deliverable address, the SMTP server returns a
550 reply, typically with a string such as "no such user - " and the
mailbox name (other circumstances and reply codes are possible).
This step of the procedure can be repeated any number of times.

https://github.com/zendframework/zend-mail/blob/master/src/Transport/Smtp.php#L224-L261
https://github.com/zendframework/zend-mail/blob/master/src/Protocol/Smtp.php#L285-L294
https://github.com/zendframework/zend-mail/blob/master/src/Protocol/AbstractProtocol.php#L326-L354

The email should be sent

Is it a problem in the smtp implementation ?

What do you think ?

I did a test with TELNET.

Connected to XXXXXXXXXXX
Escape character is '^]'.
220 xx.xxxxx.xx ESMTP (Ubuntu)
EHLO
501 Syntax: EHLO xxxxxx
EHLO xxxx
250-xx.xxxxx.xx
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
VRFY [email protected]
252 2.0.0 [email protected]
VRFY [email protected]
550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table
MAIL FROM: [email protected]
250 2.1.0 Ok
RCPT TO: [email protected]
250 2.1.5 Ok
RCPT TO: [email protected]
550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table
data
354 End data with <CR><LF>.<CR><LF>
Subject: test

Test
.
250 2.0.0 Ok: queued as 29AD1D60596
quit
221 2.0.0 Bye
Connection closed by foreign host.

=> some recipients in error BUT email is sent


Originally posted by @MadCat34 at zendframework/zend-mail#178

@alexmerlin
Copy link
Member

Closing issue due to being inactive for more than 1 year.

@alexmerlin alexmerlin closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants