Using the Mail API for Live Account Balance Alerts
Summary
This tutorial explains how to configure a trading platform’s Mail function to send email alerts, using an account balance change notification as its example. It walks through the SMTP server, sender address, generated SMTP credential, recipient, subject, and message body, and reports that correcting the settings allowed the test message to send successfully.
The practical lesson is that an SMTP credential is distinct from the mailbox password, and the mailbox must have SMTP service enabled with appropriate server and security settings. The article also says the Mail function cannot be used in backtests and must be exercised by running a live robot. Its example includes a credential in the source text; that value should be treated as exposed and revoked if still active. This is platform plumbing rather than a trading method, and the email service setup details may differ by provider or change over time.
Key ideas
- Configure the SMTP host, sender, SMTP credential, recipient, subject, and body as separate inputs.
- The SMTP credential is generated when SMTP access is enabled and is not the mailbox login password.
- A successful API return and delivery to the inbox provide evidence that the settings work.
- The tutorial states that email sending cannot be validated through backtesting and requires a running robot.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.