Re: IDSmtpRelay Connect(Host,Port)

Giganews Newsgroups
Subject: Re: IDSmtpRelay Connect(Host,Port)
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Fri, 12 Oct 2007

"RVysata" <rudolf.vysa…@creativpuls.at> wrote in message
news:E80154C8F538E340rudolf.vysa…@creativpuls.at...

> relay.Connect('127.0.0.1',25);

You need to get rid of that.  You can't use Connect() directly when using
TIdSMTPRelay.  The Send() method automatically resolves the Host for each
recipient of the message and connects to their respective mail servers
individually.  That is the whole point of the TIdSMTPRelay component - to
relay a message directly to all of the mail servers of the intended
recipients.

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

That is because TIdSMTPRelay overrides the SetHost() method specifically to
disallow the user from specifying their own Host.

Gambit

Replies

None

In response to

IDSmtpRelay Connect(Host,Port) posted by RVysata on Fri, 12 Oct 2007