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



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Sending an email from Sesame
Jul 21st, 2016 at 2:01pm
Print Post Print Post  
I'm trying to set up a command button to send an alert email to several people  in my company.  This is the first time I've tried using this feature.

Our system uses outlook.

I've written the following programming.  When I click the command button, nothing happens.  I don't get an error message, just nothing happens.  Is there something I'm doing incorrectly? 

Any help would be greatly appreciated!

Program:

var vMail as Int
     
vMail = @SendMail("mail.diacom.com","Test Alert Message","MaterialAlert@diacom.com",
"bruceb@diacom.com,paulc@diacom.com,davew@diacom.com", "", "This is a message from the new Material Usage Alert system being added to the Fabric Cutting Log in Sesame.  Please contact Paul C and let him know you've received this message.  "+@newLine()+@NewLine()+"I've just started using the last roll of "+FabricNumber,"materialalert@diacom.com","Diacom!146")

  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Sending an email from Sesame
Reply #1 - Jul 21st, 2016 at 2:43pm
Print Post Print Post  
Hi Paul,

If you add
Code
Select All
WriteLN(vMail) 

at the bottom of your programming you'll see it's returning an error code of -3. By checking the knowledgebase at http://www.lantica.com/support/kb/article/000133, -3 means "Failure from SMTP server after sending from address. Check the From address to verify that it is a valid email address."

Be sure that you have MaterialAlert@diacom.com set up as a valid email address.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Sending an email from Sesame
Reply #2 - Jul 21st, 2016 at 3:03pm
Print Post Print Post  
Ray, thanks for the suggestion.  I changed the from address to one I'm sure is valid (my own!).  I also added my address and password at the end of the program line.

I'm not getting a -7 error message.  I see what it states on the knowledgebase but what causes the error after the "end of message tag."?

Any suggestions?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Sending an email from Sesame
Reply #3 - Jul 21st, 2016 at 3:25pm
Print Post Print Post  
Hi Paul,

Try the following code. There is an error in the SendMail code in 2.6.0(which has been fixed already for the next version) where the header information for the subject is missing a carriage return so you just need to concatenate it in for your mail server as it is being strict on the headers. 

Code
Select All
var vMail as Int

vMail = @SendMail("mail.diacom.com","Test Alert Message" + @Chr(13), "MaterialAlert@diacom.com",
"bruceb@diacom.com,paulc@diacom.com,davew@diacom.com", "", "", "This is a message from the new Material Usage Alert system being added to the Fabric Cutting Log in Sesame.  Please contact Paul C and let him know you've received this message.  "+@newLine()+@NewLine()+"I've just started using the last roll of "+FabricNumber,"materialalert@diacom.com","Diacom!146") 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Sending an email from Sesame
Reply #4 - Jul 21st, 2016 at 3:41pm
Print Post Print Post  
Ray,

I'm now getting a "0" from the writeln(vMail) statement, but the email is not being sent. 

Is there something else I need to do?
  
Back to top
 
IP Logged
 
NHUser
Full Member
***
Offline



Posts: 320
Location: Amherst, NH
Joined: Aug 2nd, 2010
Re: Sending an email from Sesame
Reply #5 - Jul 21st, 2016 at 3:42pm
Print Post Print Post  
Ray, Ignore my prior email.  I just rec'd the email message!!  Took a few minutes....

Thanks for your help!!
  
Back to top
 
IP Logged