Skip to main content

A mailer designed to be used by robots to send process reports

Project description

robot_notification_mailer

Email notification library for Robocorp robots to use for reporting their process.
Mailer will send an email to the selected address, with the option of having a list of links to the handled files.

Setup

To get the Robot notification mailer up and running, provide with the following configuration details:

Robot_Mailer

Your Microsoft graph details:

Provide the Robot_mailer with a dictionary of account details.

  • CLIENT_ID = ["clientid"] :Your Microsoft Graph Client ID
  • TENANT_ID = ["tenantid"] :Your Microsoft Graph Tenant ID
  • USERNAME = ["username"] :Email address of the sending account
  • PASSWORD = ["password"] :Password for the sending account

Email sender (optional)

Provide the address to act as the from: in the emails.
You need to have permissions to send as or send on behalf of that mailbox.
If not provided, email will be sent from the username address.

Send_report_mail()

Recipients

A list of adresses to send the report to

process name

A string name for the process being reported on

status

The status of the process run.
0 = failure
1 = attention
2 = success

files handled

(Optional) a list of files handled by the process run. Items on the list will be emailed as html link elements.

python >= 3.10 msal >= 1.31.0

Example Usage

from robot_notification_mailer import Robot_Mailer

mailer_secrets = {
    'CLIENT_ID': 'your_client_id',
    'TENANT_ID': 'your_tenant_id',
    'USERNAME': 'your_email@example.com',
    'PASSWORD': 'your_password'
}
sender_address = 'another_email@example.com'

# Initialize the mailer
mailer = Robot_Mailer(mailer_config, sender_Address)

# Define recipients and report details
recipients = ['recipient1@example.com', 'recipient2@example.com']
process_name = 'Data Processing'
status = 2  # Success
handled_files = ['file1.csv', 'file2.csv']

# Send the email report
mailer.Send_report_mail(recipients, process_name, status, handled_files)

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

riverit_rpa_mailer-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

riverit_rpa_mailer-1.0.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file riverit_rpa_mailer-1.0.0.tar.gz.

File metadata

  • Download URL: riverit_rpa_mailer-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for riverit_rpa_mailer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bdfdecac079ea4d91d56f39c2122ab1d4e32caf5ae21e272affa8c2afcce4525
MD5 be888026e35fba340f52a8beb777b16d
BLAKE2b-256 a779bc58983007a9143ce37cd081cb04432ffee4f830a6dee0094bef4e69c713

See more details on using hashes here.

File details

Details for the file riverit_rpa_mailer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for riverit_rpa_mailer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d87b2cf27b9f22a901eb1cb1d5357d2076c76a8a22ea6ca86e4cf94011421b3
MD5 72dd478c452f223422b1ff725e2ac8e2
BLAKE2b-256 00fb5c2f9f879c5d827a4464b8b728a7a77e19cd8e7ffe4c7cc4b8182f8cbf60

See more details on using hashes here.

Supported by

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