
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
tgpdc-mailer
Advanced tools
A simple Python package for sending templated emails using Microsoft Graph API.
pip tgpdc-mailer
Mail.SendMail.Send.SharedCreate a .env file:
TENANT_ID=your_tenant_id
CLIENT_ID=your_client_id
CLIENT_SECRET=your_client_secret
SENDER_EMAIL=your_sender_email@domain.com
from tgpdc_mailer import Mailer
mailer = Mailer(
tenant_id="your_tenant_id",
client_id="your_client_id",
client_secret="your_client_secret",
sender_email="your_sender_email@domain.com"
)
from tgpdc_mailer import Mailer
# Initialize the mailer
mailer = Mailer()
# Send email
result = mailer.send_email(
to_emails="recipient@example.com",
subject="Welcome Email",
template_path="templates/welcome.html",
template_context={
"name": "John Doe",
"company": "ACME Corp"
}
)
<!DOCTYPE html>
<html>
<body>
<h1>Welcome {{ name }}!</h1>
<p>Thank you for joining {{ company }}.</p>
</body>
</html>
result = mailer.send_email(
to_emails=[
"recipient1@example.com",
"recipient2@example.com"
],
subject="Team Update",
template_path="templates/update.html",
template_context={
"update_text": "New project starting next week"
},
cc_emails=["manager@example.com"],
bcc_emails=["archive@example.com"]
)
result = mailer.send_email(
to_emails="recipient@example.com",
subject="Test Email",
template_path="templates/notification.html",
template_context={"message": "Hello World!"}
)
if result['success']:
print("Email sent successfully!")
else:
print(f"Failed to send email: {result['message']}")
| Issue | Solution |
|---|---|
| Authentication Failed | Check Azure AD credentials and permissions |
| Template Not Found | Verify template path and file existence |
| Invalid Recipients | Validate email address format |
Distributed under the MIT License. See LICENSE for more information.
| Version | Changes |
|---|---|
| 0.1.1 | Initial Release |
FAQs
A simple package for sending templated emails using Microsoft Graph API
We found that tgpdc-mailer 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.