Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : Re: indy 10... a piece of crap

www.cryer.info
Managed Newsgroup Archive

Re: indy 10... a piece of crap

Subject:Re: indy 10... a piece of crap
Posted by:"twistedvoid" (postmast..@twistedvoid.com)
Date:28 Mar 2006 14:09:02

>But your code is not sending anything at all if Connect() is not succeeding.
>
>> It's probably something ignorant like a password problem.
>

I was right, it was something ignorant.  It was a problem with
the wrong port number.  I had the program written in Indy set to
the same port as my netscape email client, 465.  The e-mail
client sent SMTP fine through that port, the program didn't.  I
set the program to port 587 and it started working.  I still
have no idea why netscape email has no problem with port 465 but
the program written with Indy does.

>> My formal computer education consists of a Pascal course on
>> the DEC10 in 1982.  To me, a try/except is just a glorified if/then.
>
>Hardly.  You need to brush up on what exception handling is actually about.
>It is much more complex then a simple if/then, and much more flexible.
>Indy's architecture relies heavily on exceptions.
>

Agreed, but in the past few years, there have been so many
'changes'; OOP, pointers, streams, threads, exceptions, and a
host of other 'creations' that I spend more time learning how to
rewrite the same Pascal I've known for over 20 years, than I do actually writing software.

>> My code may have not been pretty, but it worked in Indy 9.
>
>Only by a fluke on your part.  Then code you showed was not effecient even
>for Indy 9.
>

Agreed. But I'm a 'if it works, don't mess with it' kinda guy.

>> If you want to display text after an HTML part you have to
>> put that 'inline' in there, otherwise, the email client doesn't
>> display it.  Hence, when AVG scans an email, it inserts a tag
>> as such:
>
>Fair enough.  Like I said earlier, the TIdMessagePart.ExtraHeaders property
>can be used for that.

I tried your extraheaders and it added the header just fine,
thanks for that.  But, it put the messagepart in the wrong
place.  In order for the 'inline' attachment to be displayed
properly it has to come after all other messageparts, including
attachments. When Indy assembles the message it lumps all text
messageparts together.  For example:  Create a textpart then add
a file attachment.  Then add in my 'inline' attachment as
TIDtext, it gets placed between the text part and the file
attachment.

I need this

Textpart
HTMLpart
FileAttachment
'Inline' part

I get this

Textpart
'Inline' part
HTMLpart
FileAttachment


>> The best I've come up with is that 'inline' guarantees that
>> messagepart will be shown regardless of how many other
>> messageparts exist.
>
>All the more reason to write your own TIdAttachment-derived class to do what
>you need.  Look at TIdAttachmentFile.pas and TIdAttachmentMemory.pas to see
>how they are implemented.
>

Even if I do write my own class for this, will the mesageparts be added to the message in the order I create them, or the order  predetermined by Indy?

>Everything that Indy sends ultimately goes through
>TIdIOHandler.WriteDirect(), which is where the Intercept for outbound data
>is invoked.  The only place that receives data from the connection directly
>is in TIdIOHandlerStack.ReadFromSource(), which is where the Intercept for
>inbound data is invoked.  What you describe is simply not possible.  And if,
>by some chance, it were possible, it would have been seen and addressed a
>long time ago.
>

Oh, I understood, I simply couldn't understand why I was getting
a connect message where it was obviously connecting to the port
but then, not doing anything.  Once I got the port number set
properly, it started displaying traffic.  It's also going to be
very confusing for my customers should they set the port
improperly as Indy with just display 'connection closed
gracefully.'  Not a very helpful error message.

>You do not need to re-learn Indy or SSL from scratch in order to migrate
>from 9 to 10.

No, only some minor differences and additions.  What I'm saying,
when I started this, ICS was the only internet component squite
I've used and have never had to use SSL.  Indy is very
different.  For me, (read old), there's a learning curve
involved in that.

Again, thanks for the help.

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive