Guest User

Untitled

a guest
Nov 24th, 2017
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. // Some code...
  2. prAnyProcedure.submit(&parm1, &parm2)
  3. // Some code...
  4. // Some code...
  5.  
  6. for each empresa
  7. where EmpresaEstado=1
  8. &Empresanombre=EmpresaNombre
  9. &EmpresaEmail=EmpresaEmail
  10. &EmpresaServidorSalida=EmpresaServidorSalida
  11. &EmpresaServidorPassword=EmpresaServidorPassword
  12. endfor
  13.  
  14. for each recordatorios
  15.  
  16. where RecordatoriosEstado=1
  17. where RecordatoriosDiaEnvio=day(today())
  18. &smtp.Host = 'smtp.gmail.com'
  19. &smtp.Port = 25
  20. &smtp.Sender.Address = TRIM(&EmpresaEmail)
  21. &smtp.Sender.Name = TRIM(&empresanombre)
  22. &smtp.Authentication = 1
  23. &smtp.Secure=1
  24. &smtp.UserName = TRIM(&empresaEmail)
  25. &smtp.Password = trim(&EmpresaServidorPassword)
  26. &recordatoriosasunto=RecordatoriosAsunto
  27. &recordatoriostexto=RecordatoriosTexto
  28.  
  29. &mail.To.New('Mauricio','mlopez.informatica@gmail.com')
  30. &smtp.ErrDisplay = 0
  31. &smtp.Login()
  32. for each
  33. where RecordatoriosClienteEstado=1
  34. &mail.BCC.new(RecordatoriosClienteMail1,trim(RecordatoriosClienteMail1))
  35. if RecordatoriosClienteMail2<>''
  36. &mail.BCC.new(RecordatoriosClienteMail2,trim(RecordatoriosClienteMail2))
  37. endif
  38. endfor
  39. &mail.Subject = &recordatoriosasunto
  40. &mail.Text = &recordatoriostexto
  41. &smtp.Send(&mail)
  42. &mail.Clear()
  43. &smtp.Logout()
  44. endfor
Add Comment
Please, Sign In to add comment