Skip to main content

The Mail result plugin enables you to receive email notifications for job start and completion events within the Avocado testing framework.

Installation

To install the Mail results plugin from pip, use:

$ pip install avocado-framework-plugin-result-mail

Configuration

To use the Mail Result plugin, you need to configure it in the Avocado settings file.

(avocado.conf located /etc/avocado/ if not present you can create the file) Below is an configuration example:

[plugins.mail]

# The email address to which job notification emails will be sent.
recipient = avocado@local.com

# The subject header for the job notification emails.
header = [AVOCADO JOB NOTIFICATION]

# The email address from which the job notification emails will be sent.
sender = avocado@local.com

# The SMTP server address for sending the emails.
server = smtp.gmail.com

# The SMTP server port for sending the emails.
port = 587

# The application-specific password for the sender email address.
password = abcd efgh ijkl mnop

# The detail level of the email content.
# Set to false for a summary with essential details
# or true for detailed information about each failed test.
verbose = false

Usage

Once configured, the Mail result plugin will automatically send email notifications for job start and completion events based on the specified settings.

Obtaining an App Password for Gmail

Please follow these steps to generate an App Password:

Create & use app passwords

Important: To create an app password, you need 2-Step Verification on your Google Account.

  1. Go to your Google Account.

  2. Select Security.

  3. Under “How you sign in to Google,” select 2-Step Verification.

  4. At the bottom of the page, select App passwords.

  5. Enter a name that helps you remember where you’ll use the app password.

  6. Select Generate.

  7. To enter the app password, follow the instructions on your screen.

  8. The app password is the 16-character code that generates on your device.

  9. Select Done.

Enter the App Password inside of the avocado configuration file.

Remember to keep this App Password secure and don’t share it with anyone. If you suspect it has been compromised, you can always revoke it and generate a new one.

Example Plugin Outputs

Verbose True

Job Notification - Job abca44fb69558024b0af74a5654ab282f00f1253
===============================================================

Job Total Time: 24.03 Seconds
Job Finished At: 2024-06-25 16:31:58

Results
-------

- PASS: 6
- ERROR: 0
- FAIL: 1
- SKIP: 0
- WARN: 0
- INTERRUPT: 0
- CANCEL: 0

Test Summary
------------

Name: selftests/safeloader.sh
Status: FAIL
Fail Reason:
Actual Time Start: 1719325898.06546
Actual Time End: 1719325902.474006
ID: static-checks-4-selftests/safeloader.sh
Log Directory: /home/hlynden/avocado/job-results/job-2024-06-25T16.31-abca44f/test-results/static-checks-4-selftests_safeloader.sh
Log File: /home/hlynden/avocado/job-results/job-2024-06-25T16.31-abca44f/test-results/static-checks-4-selftests_safeloader.sh/debug.log
Time Elapsed: 4.410571283999161 seconds
Time Start: 22630.607959844
Time End: 22635.018531128
Tags: {}
Whiteboard:
Verbose False

Job Notification - Job 83da84014a9cbe7a89bea398eb1608dc04743897
===============================================================

Job Total Time: 24.03 Seconds
Job Finished At: 2024-06-25 16:31:58

Results
-------

- PASS: 6
- ERROR: 0
- FAIL: 1
- SKIP: 0
- WARN: 0
- INTERRUPT: 0
- CANCEL: 0

Test Summary
------------

Name: selftests/safeloader.sh
Fail Reason:

Metadata

Release files for avocado-framework-plugin-result-mail 108.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for avocado-framework-plugin-result-mail 108.0
File Size Uploaded Provenance Actions
avocado_framework_plugin_result_mail-108.0.tar.gz 6.0 kB Without provenance Details for avocado_framework_plugin_result_mail-108.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for avocado-framework-plugin-result-mail 108.0
File Interpreter ABI Platform Actions
avocado_framework_plugin_result_mail-108.0-py3-none-any.whl Python 3 none any Details for avocado_framework_plugin_result_mail-108.0-py3-none-any.whl

Total release size: 12.0 kB

Release files / avocado_framework_plugin_result_mail-108.0.tar.gz

Download URL avocado_framework_plugin_result_mail-108.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
efb2c1b6febf092c4182c16153c6c4784041be1e143fc6ff332fdf809461ba70
BLAKE2b-256 checksum
How to use checksums
d147e49555832cabbeaa81fed07d2ac23d5eb87e58c5610de2c7857f584aeef5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / avocado_framework_plugin_result_mail-108.0-py3-none-any.whl

Download URL avocado_framework_plugin_result_mail-108.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7135a7f29db3bb377a5bd7f7adb5da8cce7c9a0beae1e8873e8c692b36238a5f
BLAKE2b-256 checksum
How to use checksums
eb01c43f75c120d378d07146c4d7ed212d22fc29ba8577d0e2bbd544c27a6f94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for avocado-framework-plugin-result-mail 108.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page