Skip to main content

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

Project description

Riverit RPA mailer

PyPI version
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 RPA 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

message

(Optional) a string message to provide additional info.

files handled

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

Requirements

python >= 3.10 msal >= 1.31.0

Example Usage

from riverit_rpa_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_secrets, 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']

message = "Notes"

# Send the email report
mailer.send_report_mail(recipients, process_name, status, files_handled = handled_files, optional_message = message)

Developing the package

Publishing

TThe CI pipeline will handle the building and publishing of the package once a pull request is submitted.

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.1.0.tar.gz (9.2 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.1.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: riverit_rpa_mailer-1.1.0.tar.gz
  • Upload date:
  • Size: 9.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 c107424447a626fc54d96a686580054c7517cc249f690a6c61e4066fffeb8220
MD5 4e803576e0c78f572360667fc9ac5714
BLAKE2b-256 b92a10b243976be7931b42b5856506ef08f4f1abf919eeb0310ad0962d714331

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for riverit_rpa_mailer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 198cb63a068e9c789a594e058350ebcbe9095e40c1582bd6e57d11fff894e6b2
MD5 9fa2667d6720e327ca050713161d0747
BLAKE2b-256 23ec0329b1584769dc4d303894caa2465b0d6c59617f53031f0d8616a18ce5c9

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