• Home
  • Raw
  • Download

Lines Matching full:email

5 import email.errors
6 import email.policy
7 import email.parser
8 import email.generator
9 import email.message
10 from email import headerregistry
30 # These default values are the ones set on email.policy.default.
36 'header_factory': email.policy.EmailPolicy.header_factory,
38 'content_manager': email.policy.EmailPolicy.content_manager,
40 'message_factory': email.message.EmailMessage,
46 new_policy = email.policy.EmailPolicy()
48 email.policy.compat32: make_defaults(compat32_defaults, {}),
49 email.policy.default: make_defaults(policy_defaults, {}),
50 email.policy.SMTP: make_defaults(policy_defaults,
52 email.policy.SMTPUTF8: make_defaults(policy_defaults,
55 email.policy.HTTP: make_defaults(policy_defaults,
58 email.policy.strict: make_defaults(policy_defaults,
79 isinstance(getattr(email.policy.EmailPolicy, attr),
88 email.policy.Policy()
124 p1 = email.policy.default.clone(max_line_length=100)
125 p2 = email.policy.default.clone(max_line_length=50)
134 added = added + email.policy.default
141 msg = email.message.EmailMessage()
144 p1 = email.policy.default.clone(max_line_length=0)
145 p2 = email.policy.default.clone(max_line_length=None)
156 policy = email.policy.EmailPolicy()
174 email.policy.strict.handle_defect(foo, defect)
179 email.policy.default.handle_defect(foo, defect1)
182 email.policy.default.handle_defect(foo, defect2)
185 class MyPolicy(email.policy.EmailPolicy):
211 h = email.policy.default.header_factory('Test', 'test')
220 policy1 = email.policy.EmailPolicy()
221 policy2 = email.policy.EmailPolicy()
231 policy1 = email.policy.EmailPolicy()
240 mypolicy = email.policy.EmailPolicy()
242 newpolicy = mypolicy + email.policy.strict
244 newpolicy = email.policy.strict + mypolicy
248 newpolicy = email.policy.default + email.policy.strict
250 email.policy.EmailPolicy.header_factory)
254 policy = email.policy.default.clone(max_line_length=20)
276 policy = email.policy.default.clone(max_line_length=maxlen)
277 with self.assertRaises(email.errors.HeaderParseError):
293 class MyPolicy(email.policy.Policy):
301 email.message_from_string("Subject: test\n\n",
306 email.message_from_bytes(b"Subject: test\n\n",
312 email.message_from_file(f, policy=self.MyPolicy)
317 email.message_from_binary_file(f, policy=self.MyPolicy)
322 p = email.parser.Parser(policy=self.MyPolicy)
327 p = email.parser.BytesParser(policy=self.MyPolicy)
336 self.policy = email.policy.default.clone() if policy is None else policy
337 return email.message_from_string(source, policy=self.policy)
364 policy=email.policy.default.clone(linesep='X'))
366 g = email.generator.Generator(s)
372 policy=email.policy.default.clone(linesep='X'))
379 instance = email.policy.EmailPolicy()