Data Sheet
dScript
dScript User Manual v2.15
Email
Emails can be sent from your dScript program to alert you to any events you chose. Emails are
sent in plain text, not SSL/TLS.
To send emails from your own domain, you need to set up an email account for your board to
use. We set up an dS3484 account on our devantech domain for the test. The following 5 lines
are added to the header section of the program.
email.from "dS3484@devantech.co.uk"
email.server "smtp.devantech.co.uk"
email.port 25
email.username "dS3484@devantech.co.uk" ; account was deleted after the test
email.password "iBa4t_31" ; don't use, it won't work
The above 5 lines define the account the module will use to send emails.
You will also need to set up the recipient address like this:
emailport Devantech "sales@devantech.co.uk"
You may have as many recipients as you wish:
emailport Devantech "sales@devantech.co.uk"
emailport MyFriend "myfriend@hisdomain.com"
Two string and one integer variables are needed to send the email. The string variables are
loaded with the subject and message text, the integer variable will receive the response code.
This will be zero if the email was sent successfully.
string Subject[100]
string Msg[200]
var Response
To send the email:
Subject = "Gate sensor triggered"
Msg = "Any additional information can go here"
Devantech.Send(Subject, Msg, Response) ; send the email
Copyright © 2016, Devantech Ltd.
All rights reserved.
www.robot-electronics.co.uk
49