Advertisement
dandepp

Untitled

Mar 21st, 2023
886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PROCEDURE sendAnunciEmail()
  2.  
  3. mySession is emailSMTPSession
  4.  
  5. mySession.Name = "daniel@progdev.pro"
  6. mySession.Password = pwd
  7. mySession.ServerAddress = "progdev-pro.correoseguro.dinaserver.com"
  8. mySession.Port = 465
  9. mySession..Option = emailOptionSecuredTLS  
  10.  
  11. myEmail is Email
  12.  
  13. myEmail.Sender = "daniel@progdev.pro"
  14. myEmail.Recipient[1] = "justdanielfloyd@gmail.com"
  15. myEmail..Subject = "Test"
  16. myEmail..Message = "Hello Test 1"
  17.  
  18. EmailSetTimeOut(15)
  19. IF EmailStartSession(mySession) = True THEN
  20.     IF EmailSendMessage(mySession, myEmail) = False THEN       
  21.         Error()
  22.     END
  23.     EmailCloseSession(mySession)
  24. ELSE
  25.     Error("Unable to establish connection", ErrorInfo(), ...
  26.     "In case of timeout, check the parameters of the "+ ...
  27.     """Firewall"" on the port used (465)")
  28. END
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement