Hello guys, new to programming, i have just created my interface which includes a picture canvas and a single button. I want, when someone clicks the button an e-mail with subject "TEST" and message "It's me!" to be sent to a specific recipient. How can i make it work?
Hello,
Below is a script that you can place in your button to send an email. Note, it requires a field on the card where it can place the result, either 0 for fail, or 1 for sent.
By the way, the script does not work with my web host because they are very security conscious and do not allow port 25 to be used.
They mandate port 587 with START TLS security that HN does not support.
However, if your web host allows port 25, or 587 without the extra security, then the script should work.
Local port,server,username,password
Local res
Put 25 into port
Put 'mail.yourdomain.com' into server
Put 'name@yourdomain.com' into username
Put '123456789' into password
EmailSetServer(port,server,username,password)
EmailCreateNew
EmailSetFrom(username)
EmailSetTo('friend@somedomain.com')
EmailSetSubject('TEST')
EmailSetBodyPlain('It's me!')
Put EmailSendFN(600) into res
Put res into field 1