Skip to main content

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

  1. 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"
  2. Send a mail

    conn.send_mail(to_mail='to_mail', subject="mail subject", body="body", body_type='html')
    
    

    send_mail supported Parameters

  3. To close the connection

    conn.close_conn()
    
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mouritech-mail-notification-0.0.2.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page