endi_base package

Subpackages

Submodules

endi_base.consts module

endi_base.exception module

exception endi_base.exception.MailAlreadySent

Bases : Exception

A custom class for mail that were already sent

exception endi_base.exception.UndeliveredMail

Bases : Exception

A custom class for undelivered emails

endi_base.mail module

Format a link to fit the sender’s domain name if a bounce url has been configured

endi_base.mail.format_mail(mail)

Format the mail address to fit gmail’s rfc interpretation

endi_base.mail.get_sender(settings)

Return the mail sender’s address

endi_base.mail.send_mail(request, recipients, body, subject, attachment=None)

Try to send an email with the given datas

Paramètres:
  • request (obj) – a pyramid request object

  • recipients (list) – A list of recipients strings

  • body (str) – The body of the email

  • subject (str) – The subject of the email

  • attachment (obj) – A pyramid_mailer.message.Attachment object

Module contents