Skip to content

Commit

Permalink
Make email_regex configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kalys committed Jan 17, 2019
1 parent e87a15d commit 5850948
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/bamboo/adapters/rfc2822_with_bcc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ defmodule Bamboo.SesAdapter.RFC2822WithBcc do
@address_types ["From", "To", "Reply-To", "Cc", "Bcc"]

# https://tools.ietf.org/html/rfc2822#section-3.4.1
# taken from https://github.com/DockYard/elixir-mail/blob/bc27eba27ea0895a2fc12f5ac00de3e944a7fd8f/lib/mail/renderers/rfc_2822.ex#L25
@email_validation_regex ~r/[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,64}/
@email_validation_regex Application.get_env(
:mail,
:email_regex,
~r/[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,64}/
)

@doc """
Renders a message according to the RFC2882 spec
Expand Down

0 comments on commit 5850948

Please sign in to comment.