Setup guides

Scripts and apps: sending through Microsoft 365 after basic auth

Anything that sends with an SMTP username and password can use SMTPKeep. Create a device in the dashboard for each script or app, then use its credentials.

PowerShell

$cred = Get-Credential   # the SMTPKeep device username and password
Send-MailMessage -SmtpServer smtp.smtpkeep.com -Port 587 -UseSsl -Credential $cred `
  -From scanner@yourdomain.com -To you@yourdomain.com -Subject "Nightly report" -Body "Done."

Python

import smtplib
from email.message import EmailMessage
msg = EmailMessage()
msg["From"], msg["To"], msg["Subject"] = "alerts@yourdomain.com", "you@yourdomain.com", "Backup finished"
msg.set_content("All good.")
with smtplib.SMTP("smtp.smtpkeep.com", 587) as s:
    s.starttls()
    s.login("DEVICE_USERNAME", "DEVICE_PASSWORD")
    s.send_message(msg)

.NET (MailKit)

using var client = new SmtpClient();
await client.ConnectAsync("smtp.smtpkeep.com", 587, SecureSocketOptions.StartTls);
await client.AuthenticateAsync("DEVICE_USERNAME", "DEVICE_PASSWORD");
await client.SendAsync(message);

WordPress and other apps

In an SMTP plugin, choose "Other SMTP", host smtp.smtpkeep.com, port 587, encryption TLS, authentication on, and the device credentials.