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

Handle Mail parse error #35

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Handle Mail parse error #35

merged 2 commits into from
Dec 13, 2024

Conversation

i7an
Copy link
Contributor

@i7an i7an commented Dec 12, 2024

Motivation

Handle Mail parse error

Changes

  • Raise error when email address cannot be parsed

How to test

  • Try sending with invalid from, to, cc, bcc
  • Try sending with valid from, to, cc, bcc

Images and GIFs

N/A

@i7an i7an force-pushed the handle-mail-parse-error branch from ab3af80 to d6aaca9 Compare December 12, 2024 16:24
@i7an i7an force-pushed the handle-mail-parse-error branch from d6aaca9 to a609393 Compare December 12, 2024 16:26
@i7an i7an marked this pull request as ready for review December 12, 2024 16:29
header.respond_to?(:element) ? header.element : header&.address_list
return nil unless header

unless header.errors.empty?
Copy link
Contributor Author

@i7an i7an Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interestingly one word email address e.g. invalid are parsed with no issues. Server then returns "invalid email address" error.

@i7an i7an force-pushed the handle-mail-parse-error branch from 18b2311 to 5be0011 Compare December 13, 2024 07:26
@i7an i7an merged commit cecd916 into main Dec 13, 2024
6 checks passed
@i7an i7an deleted the handle-mail-parse-error branch December 13, 2024 08:11
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

Successfully merging this pull request may close these issues.

4 participants