Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A very simple class to send e-mails using the Python SMTP standard lib.
.. code:: python
from simplesmtp import SimpleSMTP
mail = SimpleSMTP(
host='mail.host',
username='user@mail.host',
passw='password',
from_email='You <youremail@mail.host>'
)
mail.send(to_email='email@example.com', subject='Hello', email_message='World')
# Changing default from_email
mail.send(
from_email='Another From <email@example.com>',
to_email='email@example.com',
subject='Hello',
email_message='World'
)
# Sending to more than one recipient
mail.send(
to_email='email1@example.com, email2@example.com',
subject='Hello',
email_message='World'
)
# Attachments
mail.send(
to_email='email1@example.com, email2@example.com',
subject='Hello',
email_message='World',
attachments=[
{
'file': '/path/to/real/file',
'filename': 'the name that you want'
}
]
)
Using SSL
.. code:: python
from simplesmtp import SimpleSMTP
mail = SimpleSMTP(
host='mail.host',
username='user@mail.host',
passw='password',
from_email='You <youremail@mail.host>',
port=465,
use_ssl=True
)
mail.send(to_email='email@example.com', subject='Hello', email_message='World')
HTML messages
.. code:: python
from simplesmtp import SimpleSMTP
mail = SimpleSMTP(
host='mail.host',
username='user@mail.host',
passw='password',
from_email='You <youremail@mail.host>'
)
mail.send(
to_email='email@example.com',
subject='Hello',
email_message='<html> HTML source with optional embedded images ... </html>',
msg_type='html'
)
FAQs
A very simple class to send e-mails using the SMTP Python Lib
We found that simplesmtp 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.