cpl.mailing¶
cpl.mailing.email¶
-
class
cpl.mailing.email.
EMail
(header: Optional[list] = None, subject: Optional[str] = None, body: Optional[str] = None, transceiver: Optional[str] = None, receiver: Optional[list] = None)¶ Bases:
object
-
add_header
(header: str)¶ Adds header :param header: :return:
-
add_receiver
(receiver: str)¶ Adds receiver :param receiver: :return:
-
property
body
¶
-
static
check_mail
(address: str) → bool¶ Checks if an email is valid :param address: :return:
-
get_content
(transceiver: str)¶ Returns the mail as string :param transceiver: :return:
-
property
header
¶
-
property
header_list
¶
-
property
receiver
¶
-
property
receiver_list
¶
-
property
subject
¶
-
property
transceiver
¶
-
cpl.mailing.email_client_abc¶
-
class
cpl.mailing.email_client_abc.
EMailClientABC
¶ Bases:
abc.ABC
-
abstract
connect
()¶ Connects to server :return:
-
abstract
send_mail
(email: cpl.mailing.email.EMail)¶ Sends email :param email: :return:
-
abstract
cpl.mailing.email_client_service¶
-
class
cpl.mailing.email_client_service.
EMailClient
(environment: cpl.environment.application_environment_abc.ApplicationEnvironmentABC, logger: cpl.logging.logger_abc.LoggerABC, mail_settings: cpl.mailing.email_client_settings.EMailClientSettings)¶ Bases:
cpl.mailing.email_client_abc.EMailClientABC
-
connect
()¶ Connects to server :return:
-
create
()¶ Creates connection :return:
-
login
()¶ Login to server :return:
-
send_mail
(email: cpl.mailing.email.EMail)¶ Sends email :param email: :return:
-