I am trying to send out an email in a mobile application. I got it to work but the only problem is that when I received the email, it comes with a No Subject. I know that i’m missing the subject code but i’m not sure where to place it. Each time i tried placing it somewhere I still received the email without a subject. Below is my code:
from = “email@gmail.com”
rcpt = {“email”,}
subject = {“Alert”,}
mesgt = { body = “Dear Emergency Team, This email is to inform you that the panic button has been pressed. Assess the situation accordingly.”,}
r, e = smtp.send
{
from = from,
rcpt = rcpt,
source = smtp.message(mesgt),
user = “username”,
password = “password”,
port = “port”,
end