Sending mails
Project description
Mail Notification
requirements
For running this, you need to have python3
installed on your system.
Installation
pip3 install mouritech-mail-notification (OR)
pip3 install mouritech-mail-notification --extra-index-url https://__token__:<your_personal_token>@gitlab.mouritech.com/api/v4/projects/339/packages/pypi/simple
link : https://gitlab.mouritech.com/mt-digital-core-platform/python/mail-notification/-/packages/142
Example
-
Mail Configuration
from mail_notification import MailConfig conn = MailConfig(mail_user= 'mail_ID', password='Password')
MailConfig supported Parameters
- mail_user - Mail address(Required)
- password - Password of the mail(Required)
- host - (optional) Default value is "smtp.gmail.com"
-
Send a mail
conn.send_mail(to_mail='to_mail', subject="mail subject", body="body", body_type='html')
send_mail supported Parameters
-
to_mail - Mail address(Required) (accepts "," separated values)
-
subject - subject of the mail(Required)
-
body - body of the mail(Required) (Supports string value only)
-
body_type - supports two values(Required) (plain/html) plain - "hello" html - "hello"
-
cc - cc of the mail(Optional)
-
bcc - bcc of the mail(Optional)
-
-
To close the connection
conn.close_conn()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mouritech-mail-notification-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b91996a1278188e0d9eab0f52012469178a586325e2519886c79b5360ff8149 |
|
MD5 | 1cb71a0c67a127167f4b12f840b3f9ef |
|
BLAKE2b-256 | 8e92626547c5a45af7a0b9928c8159b6fe8166a6a2f242253839b7247dcf6afe |
Close
Hashes for mouritech_mail_notification-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb0ab2123e35d28a62d923003f31e013361053b303c62058eb3273a43c00d927 |
|
MD5 | 2a876cab3c46e83b49aa63e7b757ad5b |
|
BLAKE2b-256 | 42f9e385ea8305c9122e2f933d59229a1b8a7180d844be15c9b4513565a223fd |