-
Notifications
You must be signed in to change notification settings - Fork 228
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
Ability to return custom responses? #97
Comments
As an example...
|
We already allow this for a bunch of functions, see e.g. Line 451 in 689d1d4
Maybe we're missing some others |
It is not going to work correctly since s.recipients list is not being populated. |
Speaking of "spirit of the project". I believe having any useful text in success responses has marginal benefit since most (all?) client implementations will just discard it. What is the use case? |
If you have fingerprinting concerns or just do not like silly responses, we can replace it with just "Ok". :) |
Ah, right, this is about the success reply. Not sure it's worth it to do anything complicated to support this. |
@foxcpp The use case is more for traceability -- to be able to trace the message from the ingestion point (go-smtp) to the final delivery/handoff. This is more for troubleshooting and monitoring rather than for consumption by any random SMTP client. |
I'm more interested in this on |
@oogali @gowthamgts |
I'd like to return custom responses in response to the execution of the
Mail
,Rcpt
, andData
functions of the Session object.I see I can string together my own responses using
SMTPError
, however the logic in the connection handling code doesn't particularly like receiving any sort of error.Would it be against the spirit of the project if this logic was modified to further inspect SMTPError and only error out if SMTPError.Code was not 250?
The text was updated successfully, but these errors were encountered: