Class: RubyEmail::Rfc5322

Inherits:
Core
  • Object
show all
Defined in:
lib/ruby_email/rfc5322.rb,
lib/ruby_email/rfc5322/public.rb

Overview

an Email Address follows the Rfc5322: www.ietf.org/rfc/rfc5322.txt a Domain Name follows the Rfc1123: tools.ietf.org/html/rfc1123 The Rfc5322 designate an email with the format local@domain, where  - local is a string of US-ASCII characters, without some symboles.

  • domain is a valid Domain Name

Direct Known Subclasses

Public

Defined Under Namespace

Modules: String Classes: Public

Constant Summary collapse

ATEXT =

one valid character for local part (do not take escaped because the Rfc prefere to avoid them)

'([A-Za-z0-9!#\$%&\'*\+\-/=\?\^_`\{\}\|~])'
ATOM =

a valid string for local part

"#{ATEXT}+"
DOT_ATOM_TEXT =

a valid string with subdomains, separated by dots for local part

"(#{ATOM})(\\.#{ATOM})*"
VALIDE =

email grammar

"(?<local>#{DOT_ATOM_TEXT})@(#{Rfc1123::VALIDE})"
REGEXP =

regexp to validate complete email

Regexp.new "\\A#{VALIDE}\\Z"

Method Summary

Methods inherited from Core

match, regexp, validates?