I use pppos for sending email, and when try to download body text by command “AT+SMTPBODY=20” I recieve “DOWNLOAD”. After I need send to modem only my text, for example “Test email body text” (length = 20). I recieve “ERROR”.
I tried to use pc terminal and sent all at commands manually. There were no any errors. But using mgos_pppos_run_cmds() every time I see answer “ERROR” instead of “OK” after modem answer “DOWNLOAD”.
Information from manual for modem sim800l:
My code:
struct mgos_pppos_cmd cmds[] = {
{.cmd = "AT+EMAILCID=1"},
{.cmd = "AT+EMAILTO=30"},
{.cmd = "AT+SMTPCS=\"UTF-8\""},
{.cmd = "AT+SMTPSRV=..."},
{.cmd = "AT+SMTPAUTH=1,..."},
{.cmd = "AT+SMTPFROM=..."},
{.cmd = "AT+SMTPRCPT=0,0,..."},
{.cmd = "AT+SMTPSUB=\"Test Subject\""},
{.cmd = "AT+SMTPBODY=20"},
{.cmd = "Test email body text"},
{.cmd = "AT+SMTPSEND", .cb = email_cb, .cb_arg = NULL},
{.cmd = NULL},
};
mgos_pppos_run_cmds(0, cmds);
In debug I see
[Sep 15 15:38:27.797] mgos_pppos.c:792 Command failed: AT+SMTPBODY=20
I tried to add “\r” “\n” “\x1A” and others to the end of my body text - there are no changes.
Whats wrong?
…UPDATED…
I tried to listen to AT commands sent by esp32:
I don’t send command ATO! Why is it in my commands list???
And after this, my body text doesn’t send to modem!..