v5.33
operator
manufacturer
Last updated on
Email notifications for errors and reports
The Charge Controller can be configured to send email notifications for critical errors and periodic session reports. This feature is useful for remote monitoring and diagnostics, but can be affected by several layers of configuration and network behavior.
This guide helps with setting up the SMTP configuration and identifying common pitfalls.
1. Configuration
- Log in to the Config UI using the Operator Login Credentials
-
Apply the following configuration:
info
Look up the settings needed for your email provider on their website and apply accordingly.
- At the bottom of the Config UI, click , then click to apply the changes
- (Optional) Under Backend, click to validate your settings. An email should arrive within a few minutes.
Read on if you haven't received a test email.
2. Troubleshooting
2.1. Test with Mailtrap
Mailtrap is ideal for testing:
- Accepts fake addresses
- No spam filter issues
- View messages instantly
and testing with it helps isolate Charge Controller-side vs. provider-side issues.
2.2. Mailtrap SMTP configuration
- Log in to the Config UI using the Operator Login Credentials
-
Apply the following configuration:
- Enter the Mailtrap credentials into the corresponding Config UI fields under Backend > Email notification
- At the bottom of the Config UI, click , then click to apply the changes
- Under Backend, click to validate your settings. An email should arrive within a few minutes.
2.3. Troubleshooting flow
3. Common issues
4. Charge Controller-side retry checklist
- Confirm the Charge Controller has internet access
- Disable VPN or test off corporate network
- Use Mailtrap SMTP config first
- Try port 587 with STARTTLS
- Use plain text body only
- Check logs for
send_email()errors
5. If still stuck, test externally
curl --ssl-reqd --url smtp://sandbox.smtp.mailtrap.io:587 \
--user "username:password" \
--mail-from you@example.com \
--mail-rcpt you@example.com \
--upload-file email.txt
Or:
import smtplib
from email.message import EmailMessage
msg = EmailMessage()
msg.set_content("Test email")
msg['Subject'] = "Test"
msg['From'] = "you@example.com"
msg['To'] = "you@example.com"
smtp = smtplib.SMTP("sandbox.smtp.mailtrap.io", 587)
smtp.starttls()
smtp.login("your_username", "your_password")
smtp.send_message(msg)
smtp.quit()