Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- &MailMessage.To.New(Format("%1 %2","Zé", "Manel"), "fabioamrodrigues98@gmail.com")
- &MailMessage.Subject = 'Xuxões - Confirmação da sua Proposta'
- &infoContent = prSetHtml.udp(&ProprietarioNome,&ProprietarioUltimoNome,&Distrito,&Concelho,&Freguesia,&AnuncioTipo,&AnuncioTipologia,&AnuncioPreco,&AnuncioId,&AgenteNome,&AgenteUltimoNome,&AgenteTelemovel)
- &MailMessage.HTMLText = &infoContent
- &SMTPSession.Host = 'smtp.gmail.com'
- &SMTPSession.Port = 587
- &SMTPSession.UserName = 'redshiftgx@gmail.com'
- &SMTPSession.Password = 'Redshift#GX'
- &SMTPSession.Sender.Name = 'Xuxões'
- &SMTPSession.Sender.Address = 'redshiftgx@gmail.com'
- &SMTPSession.Authentication = 1
- &SMTPSession.Secure = 1
- &OK = &SMTPSession.Login()
- If &SMTPSession.ErrCode = 0
- &SMTPSession.Send(&MailMessage)
- If &SMTPSession.ErrCode <> 0
- &Message = Format('Failed to send email: %1 (%2)', &SMTPSession.ErrDescription, &SMTPSession.ErrCode)
- Endif
- &SMTPSession.Logout()
- Else
- &Message = Format("Failed to start email session: %1 (%2)", &SMTPSession.ErrDescription, &SMTPSession.ErrCode)
- Endif
- If &Message.IsEmpty()
- lbEstado.Caption = '<div class="alert alert-info" style="margin-top: 10px;"><strong>Um email foi enviado ao proprietário.</strong></div>'
- Else
- Msg(&Message)
- Endif
Add Comment
Please, Sign In to add comment