Open codedge opened 1 year ago
@codedge Thanks! It is out of minimal scope. But I agree, seems we should implement it. https://www.rfc-editor.org/rfc/rfc5322#section-3.4
Hi,
I encouraged the same problem. What is the priority of this one? @bestwebua
Can it be solved by updating the emailRegexPattern
in consts.go
?
More failing cases (Should be valid):
John <john@mail.com>
<john@mail.com>
Hello, @cengizhancaliskan! Thanks for your interest! Yes, it can be solved here:
emailRegexPattern
:
https://github.com/mocktools/go-smtp-mock/blob/d29f933cc7f5f26966000fb5e2fe5cca8f1c165a/consts.go#L56Also we need to update handlerMailfrom
and handlerRcptto
dependent methods:
handlerMailfrom#mailfromEmail
, composite regex validMailromComplexCmdRegexPattern
:handlerRcptto#rcpttoEmail
, composite regex validRcpttoComplexCmdRegexPattern
:
New bug checklist
smtpmock
to the latest versionBug description
I am trying to send an email with this sender address
John Doe<john.doe@example.com>
. I think this should also be a valid email address format to be supported by smtpmock.Currently I am getting back this error:
SMTP response: 501 MAIL FROM requires valid email address
This applies to both, sender and receiver address.
Complete output when running smtpmock, including the stack trace and command used