Guest User

Untitled

a guest
Jun 26th, 2018
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. &MailMessage.To.New(Format("%1 %2","Zé", "Manel"), "fabioamrodrigues98@gmail.com")
  2. &MailMessage.Subject = 'Xuxões - Confirmação da sua Proposta'
  3. &infoContent = prSetHtml.udp(&ProprietarioNome,&ProprietarioUltimoNome,&Distrito,&Concelho,&Freguesia,&AnuncioTipo,&AnuncioTipologia,&AnuncioPreco,&AnuncioId,&AgenteNome,&AgenteUltimoNome,&AgenteTelemovel)
  4. &MailMessage.HTMLText = &infoContent
  5. &SMTPSession.Host = 'smtp.gmail.com'
  6. &SMTPSession.Port = 587
  7. &SMTPSession.UserName = 'redshiftgx@gmail.com'
  8. &SMTPSession.Password = 'Redshift#GX'
  9. &SMTPSession.Sender.Name = 'Xuxões'
  10. &SMTPSession.Sender.Address = 'redshiftgx@gmail.com'
  11. &SMTPSession.Authentication = 1
  12. &SMTPSession.Secure = 1
  13. &OK = &SMTPSession.Login()
  14. If &SMTPSession.ErrCode = 0
  15. &SMTPSession.Send(&MailMessage)
  16. If &SMTPSession.ErrCode <> 0
  17. &Message = Format('Failed to send email: %1 (%2)', &SMTPSession.ErrDescription, &SMTPSession.ErrCode)
  18. Endif
  19. &SMTPSession.Logout()
  20. Else
  21. &Message = Format("Failed to start email session: %1 (%2)", &SMTPSession.ErrDescription, &SMTPSession.ErrCode)
  22. Endif
  23. If &Message.IsEmpty()
  24. lbEstado.Caption = '<div class="alert alert-info" style="margin-top: 10px;"><strong>Um email foi enviado ao proprietário.</strong></div>'
  25. Else
  26. Msg(&Message)
  27. Endif
Add Comment
Please, Sign In to add comment