
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.
Mail1 is an API to send email with a single function call. For instance, we could send an email running:
::
import mail1
mail1.send(subject='Test',
text='This is a test!',
recipients='casa@sweetohm.net',
sender='casa@sweetohm.net',
smtp_host='smtp.orange.fr')
That's it!
The signature of the method to send an email is the following:
::
send(subject, text, text_html=None, sender=None,
recipients=[None], cc=[], bcc=[], attachments={},
encoding=ENCODING, smtp_host=SMTP_HOST, smtp_port=SMTP_PORT,
username=None, password=None)
The parameters are the following:
If not set, SMTP host, username and password are extracted from environment variables MAIL_SMTP, MAIL_USERNAME and MAIL_PASSWORD.
You can also invoke this script on command line to send emails. To get help about command line parameters, type mail1 -h, which will display following help page:
::
mail1 [-h] -f from -r recipient -s subject -a file
-m smtphost -e encoding message
Send an email with following:
-h Print this help page
-f from The mail sender
-r recipient The mail recipient (repeat for more than one recipient)
-s subject The mail subject
-a file A file to attach
-e encoding The encoding to use
-m smtphost The SMTP server host
-u username The SMTP username
-p password The SMTP password
message The message
If not passed on command line, SMTP host, username and password are extracted from environment variables MAIL_SMTP, MAIL_USERNAME and MAIL_PASSWORD.
Enjoy!
FAQs
mail1 is an API to send emails in a single call
We found that mail1 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.