IDSmtpRelay Connect(Host,Port)

Giganews Newsgroups
Subject: IDSmtpRelay Connect(Host,Port)
Posted by:  RVysata (rudolf.vysa…@creativpuls.at)
Date: Fri, 12 Oct 2007

Hi again :-)

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

relay:=TIdSMTPRelay.Create(nil);
relay.MailAgent:='Relay';
//relay.BoundIP:='89.144.236.3';
//relay.BoundPort := 23;
IdMessage.From.Text := 'ru…@email.com';
IdMessage.Sender.Text := 'ru…@email.com';
IdMessage.Recipients.EMailAddresses := 'ru…@email.com';
IdMessage.Subject :='asd';
IdMessage.Body.Add('sdsf');
relay.DNSServer := '194.48.139.254';
relay.Connect('127.0.0.1',25);
relay.Send(IdMessage);

return the error: "can not assign Host propertiy, it is resolved by
IdDirectSmtp on the fly"by relay.connect(host,port).

Maybe some help for me ...?

Thx, Rudolf

Replies