Monteiro Posted June 10, 2014 Share Posted June 10, 2014 Algum exemplo de envio de email pelo unigui? Link to comment Share on other sites More sharing options...
possidonio Posted August 20, 2014 Share Posted August 20, 2014 Monteiro, Para enviar um e-mail, você pode utilizar os componentes IdSMTP normalmente. Segue exemplo: procedure TMainForm.EnviarEmail; var Email: TIdMessage; begin Email := TIdMessage.Create(nil); Email.Subject := 'Credenciamento'; Email.Body.Add('Ola, ' + EdtNome.Text + ' voce se credenciou'); Email.Body.Add(''); Email.Body.Add('Confira seus dados, e entre em contato conosco em caso de erro.'); Email.Body.Add('CPF: ' + EdtCPF.Text); Email.Body.Add('Telefone: ' + EdtCelular.Text); Email.Body.Add(''); Email.Body.Add('A equipe agradece seu cadastro, em breve, entraremos em contato.'); Email.Body.Add(''); Email.Sender.Address := 'atendimento@xxxx'; Email.From.Address := 'atendimento@xxxx'; Email.ReplyTo.Add.Address := 'atendimento@xxxx'; Email.Encoding := meMIME; Email.Recipients.Clear; Email.Recipients.EMailAddresses := EdtEmail.Text; Email.BccList.EMailAddresses := xxxx@xxxx'; if not IdSMTPMain.Connected then begin try IdSMTPMain.Connect; IdSMTPMain.Send(Email); finally IdSMTPMain.Disconnect(True); end; end; end; Atenciosamente, Possidônio Oliveira. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now