
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
PyAlert is a Python-based notification system that allows you to send emails via the Gmail API with optional file attachments (up to 5MB). It ensures emails are still sent even if the file is too large or missing, with a note included in the message.
pip install --upgrade google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client
credentials.json
and place it in your project folder.from pyalert import PyAlert
# Initialize PyAlert
pa = PyAlert(credential="credentials.json", token="token.json")
# Update the sender's address
pa.update_sender("fromsender@gmail.com")
# Update subject line. Default is "PyAlert Notification"
pa.update_subject("New subject")
# Send an email
pa.push_notification("torecipient@example.com", "Hello! This is a test message.")
pa.push_notification("recipient@example.com", "Here's your report!", "report.pdf")
You can send text messages (SMS) and multimedia messages (MMS) via email using the following carrier gateways. To send a text message via email, use this format:
[10-digit phone number]@[carrier domain]
Scenario | Email Sent? | File Attached? | Additional Note in Email? |
---|---|---|---|
Valid file 5MB | Yes | Yes | No extra note |
File is missing | Yes | No | Yes: "File not found." |
File is too large (>5MB) | Yes | No | Yes: "File too large." |
This project is provided "as is", without warranty of any kind, express or implied. The author makes no guarantees regarding the accuracy, reliability, or suitability of this software for any particular purpose.
By using this project, you acknowledge that:
Use this project at your own risk. 🚀
This project is licensed under the MIT License.
FAQs
A Python package for sending email notifications using the Gmail API.
We found that pyalert-gmail demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.