Skip to content

Validatable IEmailAddress #103

@asiffermann

Description

@asiffermann

There is no email validation in Proffer.Email, except a very simple one for recipients in EmailSender (and only when mockup is configured? 🤷‍♂️):

string[] emailParts = recipient.Email.Split('@');
if (emailParts.Length != 2)
{
throw new NotSupportedException("Bad recipient email.");
}
string domain = emailParts[1];

  • Proffer.Email should provide a way to validate a IEmailAddress using a complete regex or System.Net.Mail.MailAddress.
  • All email addresses arguments (recipients of all kinds, sender, reply-to...) should be validated with Guards.
  • The options providing email addresses (default sender, mockup...) should be validated at startup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions