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

Make prohibited_domain_characters_regex changeable #157

Merged
merged 2 commits into from
Aug 7, 2020
Merged

Make prohibited_domain_characters_regex changeable #157

merged 2 commits into from
Aug 7, 2020

Conversation

georf
Copy link
Contributor

@georf georf commented Jul 2, 2020

On some SMTP servers you are not allowed to send mails to UTF-8 addresses. On my side its not allowed
to have "umlaut" in domain part.

This patch allows you to change the prohibited_domain_characters_regex such as a initalizer:

# config/initializers/valid_email2.rb

ValidEmail2::Address.prohibited_domain_characters_regex = /[+!_\/\s'`äöüÖÄÜß]/

On some SMTP servers you are not allowed to send mails to UTF-8 addresses. On my side its not allowed
to have "umlaut" in domain part.

This patch allows you to change the prohibited_domain_characters_regex such as a initalizer:

```ruby

ValidEmail2::Address.prohibited_domain_characters_regex = /[+!_\/\s'`äöüÖÄÜß]/
```
Copy link
Owner

@micke micke left a comment

Choose a reason for hiding this comment

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

Hi again, sorry for the delay and thanks for yet another good PR! I've only got one comment to make it a bit more idiomatic :)

lib/valid_email2/address.rb Outdated Show resolved Hide resolved
Copy link
Owner

@micke micke left a comment

Choose a reason for hiding this comment

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

🥇 Thanks!

@micke micke merged commit b4b2d95 into micke:master Aug 7, 2020
@georf georf deleted the make_prohibited_chars_changeable branch August 10, 2020 07: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.

2 participants