Question about TIdSMTPRelay

Giganews Newsgroups
Subject: Question about TIdSMTPRelay
Posted by:  Alexandre (alexandrepires20…@yahoo.com.br)
Date: Sat, 21 Jul 2007

Hi guys,

I am try sending one email with TIdSMTPRelay.

I made this

IdMessage:=TIdMessage.Create(nil);
IdMessage.Encoding:=meMIME;

relay:=TIdSMTPRelay.Create(nil);
relay.MailAgent:='Relay';
IdMessage.From.Text := form1.Edit13.text;
IdMessage.Sender.Text := form1.Edit13.text;
IdMessage.Recipients.EMailAddresses := email;
IdMessage.Subject := form1.edtSubject.text;
IdMessage.Body := form1.memo4.Lines;
relay.DNSServer := form1.edit12.Text;
relay.Send(IdMessage);

My questions are:

1- That is correct ?

2- How to know if an error occurred and the message was not delivers

Thx for some help
Alexandre
Brazil

Replies