Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jan : Re: SMTPserver problem - D7 indy10.0.52

www.cryer.info
Managed Newsgroup Archive

Re: SMTPserver problem - D7 indy10.0.52

Subject:Re: SMTPserver problem - D7 indy10.0.52
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Wed, 1 Feb 2006 11:56:58

"Jacques" <jacques.noah@btinternet.com> wrote in message
news:43e0f365$1@newsgroups.borland.com...

> I've now tested the SMTPServer and i'm still not able to pass on
> the -from,to,body fields - is the AMsg stream holding all the headers,
> including -from,to,body-?

No, not even close.

> I 've attached a logfile to see what is happening step by step and i
> really cant understand why those headers are not getting through.

If you strip out all of the irrelvent stuff from the log, you end up with
the following transaction list:

    220 Welcome  Server
    helo localhost
    250 Hello localhost
    mail from:admin@localhost
    250 admin@localhost Address Okay
    rcpt to:admin@loop.com
    250 admin@loop.com Address Okay
    RSET
    250 Ok
    RSET
    250 Ok
    mail from:admin@localhost
    250 admin@localhost Address Okay
    rcpt to:admin@loop.com
    250 admin@loop.com Address Okay
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    subject:The subject here
    this is the msgbody

    .
    250 Ok
    QUIT
    221 Signing Off


First and foremost - why are you sending RSET twice after specifying the
recipient?  RESET should be sent once before sending anything
message-related.

Second, as you can see, the actual message looks like this:

    subject:The subject here
    this is the msgbody

    .

Which is wrong for three reasons:

1) there are no brackets on the addresses specified in the MAIL FROM and
RCPT TO commands
2) there are no To and From headers in the message data at all
3) there is no blank line between the headers and the body text

The communication should look more like the followig instead:

    220 Welcome  Server
    HELO localhost
    250 Hello localhost
    RSET
    250 Ok
    MAIL FROM:<admin@localhost>
    250 admin@localhost Address Okay
    RCPT TO:<admin@loop.com>
    250 admin@loop.com Address Okay
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    From: <admin@localhost>
    To: <admin@loop.com>
    Subject: The subject here

    this is the msgbody
    .
    250 Ok
    QUIT
    221 Signing Off

Yes, the actual message data has to include a copy of the email addresses
that were specified in the MAIL FROM and RCTP TO commands.  Otherwise, the
recipient(s) will never see the addresses.  Everything inside the DATA
command is copied to the recipient(s) as-is.

> I think that the headers get deleted somewhere between been
> transfered from tstream to idmessage component

Not true.  Your own log shows that the headers ar never being sent in the
first place.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive