Normal Topic Sending an email from Sesame (Read 1059 times)
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Sending an email from Sesame
Apr 7th, 2016 at 7:59pm
Print Post Print Post  
I would like to have an email sent from an event in Sesame.  Basically, I want an email sent automatically based on an On Element Exit or On Element Change event as I leave the element based on if the data in the element has changed.

The email would be sent to one or more individuals with a standard "alert" statement.

Is this something that can be done?

  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sending an email from Sesame
Reply #1 - Apr 7th, 2016 at 8:08pm
Print Post Print Post  
Yep. See @SendMail in SBasic.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Sending an email from Sesame
Reply #2 - Apr 8th, 2016 at 2:00pm
Print Post Print Post  
You may need to run your emails through a third party E-mail delivery. I had problems with some emails not getting throgh using my own provider and I have found SMTP2go to work successfuly with most emails going through with attachments and all.
If you search this forum there is lots of info. Below is the code I use successfully daily. I just build my variables and have the section of code below run them.

There may be simpler better and more sophisticated ways to accomplish your goals with Sbasic but I posted the code below for reference if nothing else.

Hope it may help.


                       Vcomplete = "your E-mail to " + @Replace(Vemaildata, "@", "@@")  +  " was successful!" + @NewLine() + @NewLine() //+ Vbody

                       if(@AskUser("You are about to send an Email to ", @Replace(Vemaildata, "@", "@@"), " Continue?"))
                       {      
                                                           b = @SendMail("smtp2go.com", vsubject, VFromEmail, Email, "", "", vbody, "pass@xxxxxx.com", "password", "")
                             voutcome = b
                             if(b = "0")
                             {
                                   @MsgBox("", vcomplete, "")
                 
                                   //Do stuff
                                   Email_WelcomeSentDate = @date
                                   Status = "005"
                                   StatHistory005 = @Date + " " + @serverTime()
                                   StatHistoryby005 = @userId + " "  + @Date + " " + @ServerTime()
                                   StatusAllupdatesub()
                                   FormCommit("")
                             }
                             else
                             {
                                   @MsgBox("E-mail was not successful", "", "")
                             }
                       }
                 }
                 else
                 {
                       @MsgBox(vMsg, "", "")
                 }
           }
           else
           {
                 @MsgBox("A welcome Email has been previously sent ", "", "you can not re-send using this button")
           }
     
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged