First of all you need an SMTP account like 'smtp2go' or even gmail.
Associated with this account you must gather the following information :google account
- The login (or user name)
- The password
- The SMTP server and the port required.
For smtp2go the infos are :
Server : mail.smtp2go.com and the port is 465
Server: smtp.gmail.com and the port is 465. Note that gmail must be "unlocked" in order to activate this functionality. This can be done going into the settings of your google account and activate the option "Less secure app access" Then ony 2 lines are required to send an email with Annex:
CODE: email.bas
EMAIL.SETUP "smtp.gmail.com", 465, "my_login", "my_pass" 'replace with your login / password
print EMAIL ("from_me@gmail.com", "to_you@gmail.com", "Title - important message", "The memory available is low!") This program will print '1' in the console if the message has been sent or 0 in case of problem NOTE : if you message contains colons ie a time$ "10:12:34" then it may not send. A work around is to use the replace$ command to replace : with - " |
How To ... >