Re: [twsocket] Should next ICS version support anything before Delphi XE ?

2012-03-28 Thread Jeff Cook
 
Hi 

Still on Delphi 7.  My app uses DBISAM v3 from ElevateSoft and Delphi 7 is
the last Delphi supported.  To go to DelphiAnythingNewer I have to go to
DBISAM v4 or ElevateDB - both of these options have substantial work
involved for little visible advantage to the user, so for them moment I'm
doing the user stuff and sticking with D7.  ICS V5 is working well for me.

Thanks 

Jeff
--
Jeff Cook
Aspect Systems Ltd
Phone:   +64-9-435 5324
Mobile: +64-21 024 35568
Skype: jeffraro
www.aspect.co.nz 

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of François Piette
Sent: 28-Mar-12 11:59
To: ICS support mailing
Subject: [twsocket] Should next ICS version support anything before Delphi
XE ?

Hi !

 

I'm planning the next ICS version.

Being unable to use any features added to Delphi in the last 10 years is
very restricted.  Maybe we need to cease support for old Delphi versions ?
Of course ICS V5 and V7 will remains available however, the only changes
will be bug fixes.

 

What do you think ? Please keep your answer as short as possible, I just
want to have an idea about how many of you are still using an old Delphi
version.

 

--

francois.pie...@overbyte.be

The author of the freeware multi-tier middleware MidWare

The author of the freeware Internet Component Suite (ICS)

http://www.overbyte.be

 

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Download file from FTP with ProgressBar in Delphi

2009-11-18 Thread Jeff Cook
Hi Anton

I think you just need to use the OnProgress event like this ...

procedure TFTPDownloadForm.FTPProgress(Sender: TObject; Count: Integer;
  var Abort: Boolean);
begin
  Abort := bCancel; // bCancel is a boolean set by clicking cancel
button
  progDB.Position := Count;
end;

HTH

Jeff

--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz
+
The Cooks Oasis
www.cookislandsoasis.com
Phone: +682 28 213
Skype: jeffraro
 


-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
On Behalf Of Anton Nikulin
Sent: Wednesday, 18 November 2009 4:27 a.m.
To: twsocket@elists.org
Subject: [twsocket] Download file from FTP with ProgressBar in Delphi


Hi! I use FtpClient to download file from FTP-server. How can I show
download progress in ProgressBar?
--
To unsubscribe or change your settings for TWSocket mailing list please
goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Struggling with SSL SMTP

2009-11-17 Thread Jeff Cook
Hi all

I need to add SSL support to my existing application that includes some
automated emailing.  A local ISP has told some of our users that they
must use SSL for their email - not sure of the reasons but it happened
when the ISP linked up with Yahoo.

I thought the best thing to do would to use the SSL SMTP demo program to
prove that I could make the connection before I coded anything into my
program.  BUT I just can't make it work.  The ISP told the user that to
make their Outlook email client work that they just had to tick the
This server requires a secure connection (SSL) box and as far as I
know that is all they have had to do.  I'm using their
Username/Password/SMTP Host/From/Port in running my test.

I've tried various combinations of Authentication and SSL-Type with no
success - they usually end up with the message 530 Access denied.

The following info messages came up when I tried Plain and Implicit and
pressed the following buttons:-

Connect
Helo
Ehlo
Auth

! Starting SSL handshake
Secure connection with TLSv1, cipher AES256-SHA, 256 secret bits (256
total)
 220 smtp103.tnz.mail.aue.yahoo.com ESMTP
RequestDone Rq=0 Error=0
 HELO ASL3
 250 smtp103.tnz.mail.aue.yahoo.com
RequestDone Rq=1 Error=0
 EHLO ASL3
 250-smtp103.tnz.mail.aue.yahoo.com
 250-AUTH LOGIN PLAIN XYMCOOKIE
 250-PIPELINING
 250 8BITMIME
RequestDone Rq=10 Error=0
 AUTH PLAIN ci5sY29ub24Aci5sY29ub25AeHRyYS5jby5uegBiZWFyMTAzNg==
 530 Access denied
RequestDone Rq=11 Error=530 Access denied

I also get RequestDone Rq=11 Error=500 STARTTLS is not available.
whenever I press the StartTLS button or change the SSL-Type to Explicit.

Any clues as to what I have wrong or how to find out where it is going
wrong?

TIA

Jeff

--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz
+
The Cooks Oasis
www.cookislandsoasis.com
Phone: +682 28 213
Skype: jeffraro

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ftpSizeAsync, ftpDirAsync

2009-10-18 Thread Jeff Cook
Email me at je...@pl.net and I'll send you my FTP download module.  

However I just created it using the examples that you have already been
pointed to.  The key is the OnRequestDone event - took me a while to
understand the async logic ;-)

--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz
+
The Cooks Oasis
www.cookislandsoasis.com
Phone: +682 28 213
Skype: jeffraro
 


-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
On Behalf Of Signed SourceR Project
Sent: Sunday, 18 October 2009 8:30 a.m.
To: ICS support mailing
Subject: [twsocket] ftpSizeAsync, ftpDirAsync


Hello,
Can some please be kind and explain how these things are supposed to be
used? Where? In what conditions? a simple example? I am not a guru you
know.

How can I get directory content to an TListBox?

I am getting nowhere with this.
Just getting all time Component not ready.

- dan
--
To unsubscribe or change your settings for TWSocket mailing list please
goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Upgrading from ICS to ICS-SSL

2009-08-10 Thread Jeff Cook
Hi

I am running an older version of ICS - can't see a version number
anywhere except that IcsDel60.bpl has a file version of 3.0.0.25.

This works fine and I haven't had the need to keep up with current
versions.  Now a major ISP in New Zealand (where most of our users are)
has declared that they will only support SMTP with SSL.

I can see how to download the ICS-V5 distribution from www.overbyte.be
which says it includes ICS-SSL for free.  

If I install this, will all my existing code work or will I have to go
through and redo everything?  I guess I'm asking if the component names
are all the same and with the properties set as they currently are, will
my programs still work as at present.  And I expect that I'll have to
set some new properties for SSL.

OK for Delphi 6?

Trying to gauge the size of the task before I launch into it, so I can
schedule an appropriate amount of time.

TIA

Jeff
--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz 
+
The Cooks Oasis
The Cooks Ltd
Phone: +682 28 213
Skype: jeffraro
www.cookislandsoasis.com

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] AV trying to download from a website

2009-03-13 Thread Jeff Cook
Hi
 
I'm trying to download a program version number from a website using
HttpCli and getting an AV where marked  AV in the code below.
 
My code is based in the HttpTst demo program, adapted (and stuffed up!)
for my needs.
 
I looks like this:-
 
procedure TSplashForm.FormCreate(Sender: TObject);
var
  sVersion: string;
begin
 {Some screen values come from Project | Options - VersionInfo }
  bCanHide := False;
...
  sVersion := Common.GetVersionInfoByKey('FileVersion');
...
  HttpCli.URL := URL.Caption;
  sWebVersion := '';
  try
HttpCli.Get;
  except
sWebVersion := 'Not found';
bCanHide := True;
HttpCliDocEnd(nil); { This will close the file }
Exit;
  end;
end;

procedure TSplashForm.HttpCliDocBegin(Sender: TObject);
begin
  try
HttpCli.RcvdStream := TMemoryStream.Create;
  except
sWebVersion := 'Not found';
bCanHide := True;
  end;
end;
 
procedure TSplashForm.HttpCliDocEnd(Sender: TObject);
begin
  if HttpCli.RcvdStream  nil then begin
HttpCli.RcvdStream.Free;
HttpCli.RcvdStream := nil;
  end;
end;
 
procedure TSplashForm.HttpCliRequestDone(Sender: TObject;
  RqType: THttpRequest; ErrCode: Word);
var
  i: integer;
  sl: TStringList;
  b: Boolean;
  sReleaseDate: string;
begin
  if ErrCode = 0 then
  begin
sl := TStringList.Create;
sl.LoadFromStream(HttpCli.RcvdStream);  AV here
b := False;
for i := 0 to sl.Count - 1 do
begin
  if Copy(sl[i], 1, 8) = 'Version=' then
  begin
sWebVersion := Copy(sl[i], 9, 15);
sNewVersion := VersionStr(sWebVersion);
b := True;
  end
  else if Copy(sl[i], 1, 12) = 'ReleaseDate=' then
sReleaseDate := Copy(sl[i], 13, 20);
end;
if b and (sNewVersion  sThisVersion) then
begin
  MessageDlg('There is a new version of the Aspect Property Manager
available:-'
+ #13#10#13#10'Version: ' + sWebVersion
+ #13#10'Release Date: ' + sReleaseDate
+ #13#10#13#10'You can download this new version '
+ 'by going to HelpDownload New Version on the main screen
menu', mtWarning, [mbOK], 0);
end;
bCanHide := True;
  end
  else begin
sWebVersion := 'Not found';
bCanHide := True;
  end;
end;

What am I doing wrong?

--

Jeff Cook

The Cooks Oasis

The Cooks Ltd

Phone: +682 28 213

Skype: jeffraro

www.cookislandsoasis.com http://www.cookislandsoasis.com/  

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] AV trying to download from a website

2009-03-13 Thread Jeff Cook
Thanks for that Piotr

Indeed it is nil.  Obviously I done understand the order of firing of
events.

I followed the example (I think!) and created the stream in DocBegin,
used it RequestDone and freed it in DocEnd - which seems logical but in
debugging I see that DocEnd comes before RequestDone.

Moving the freeing of the stream to RequestDone makes it work - but
then why doesn't the example AV???

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
On Behalf Of Piotr Da³ek
Sent: Friday, 13 March 2009 10:51 a.m.
To: ICS support mailing
Subject: Re: [twsocket] AV trying to download from a website


Probably you're freeing destination stream before using it. Put
something like

if HttpCli.RcvdStream=nil then
ShowMessage('RcvdStream is NIL, click OK to crash.');

before sl.LoadFromStream(HttpCli.RcvdStream); to check whether that's
the case.

-- 
Piotr Dałek
enigmati...@interia.pl

--

Zyskaj tak jak ja 9% na lokacie w pierwszym miesiacu! 
Sprawdz! http://link.interia.pl/f207b


-- 
To unsubscribe or change your settings for TWSocket mailing list please
goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] ICS and SMTP secure connections

2008-08-05 Thread Jeff Cook
Hi 
 
I have asked here before and got knowledgeable replies but in my
ignorance of the inner workings of SMTP etc.  I have thoroughly confused
myself!
 
The problem I have is in the quote at the foot of this email about an
SMTP server requiring a secure connection
 
I have read on the Overbyte website about ICS-SSL and thought that was
the answer, but now I look again as far as I can see, ICS-SSL seems to
relate to https stuff and servers whereas presumably I need smtps on an
smtp client,  which doesn't seem to be mentioned. 
 
I found code at http://wiki.overbyte.be/wiki/index.php/TSmtpCli.Auth
(see below)
 
= 

Using open to handle all in one request 


The easiest way to use authentication is to use Open instead of Connect.
Open handles the Connect, EHLO and AUTH in one so that you don't need to
consider it. This is a typical call to open. 

 Smtp.Username := 'bob';

 Smtp.Password := 'test';

 Smtp.authtype := smtpAuthAutoSelect;

 Smtp.open



In your requestdone event you handle open and trigger the
mailfrom-metohd. 

=
 
So if I'm only working at the Client end, do I simply stick with the
standard TSmtpCli and handle the AuthType Property, using
smtpAuthAutoSelect if a secure connection is required and smtpAuthNone
otherwise?
 
Or have I got it all wrong?
 
Cheers
 
Jeff

=== the following comment came from our guy who does the user
support role in our company - Xtra is a major ISP in New Zealand =

With the advent of the Xtra / Yahoo shambles we are having Xtra
customers no longer being able to send email statements or normal emails
from APM (our application). Changes are being made to Xtra users systems
over a period of time so we will be suffering from creeping death.

The problem is that Xtra now want to use port 465 (just to be different
to the rest of the world I guess) and also use SSL.
We need to make these changes in the APM.

The following is an extract from their web site which probably is all
you need but if you want more go to 
http://xtra.co.nz/help?link=rdt and enter port 25 (no quotes) into the
Search Xtra Help box then Ctrl+F and search for Server Port Numbers
(no quotes)

Website Extract
Server Port Numbers 
Under 'Outgoing mail (SMTP)', tick the box next to 'This server requires
a secure connection (SSL)'. Enter port number '465' in the 'Outgoing
mail (SMTP)' field 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS and SSL

2008-04-30 Thread Jeff Cook
Hi Francois

I actually wanted to use the ICS-SSL mailing list, but just can't find
it to subscribe.  I've looked here
http://lists.elists.org/cgi-bin/mailman/listinfo and the ICS-SSL isn't
listed.  

Cheers

Jeff

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Francois Piette
Sent: Tuesday, 29 April 2008 10:36 p.m.
To: ICS support mailing
Subject: Re: [twsocket] ICS and SSL


Please use ICS-SSL mailing list.
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


- Original Message - 
From: Jeff Cook [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Tuesday, April 29, 2008 11:17 PM
Subject: [twsocket] ICS and SSL


 Hi
  
 This is probably a misuse of this list as I gather there is one 
 devoted to SSL  however since I already belong to this one and I 
 guess the main players in SSL are here too, here goes.
  
 I'm confused about how I go about using ICS for an SMTP client
connected
 to a mail server that uses SSL.   I have googled around and end up on
a
 page asking for contributions to the development effort - problem 
 there
 - but I see the page says
  
 ICS - SSL Effort 
   http://www.overbyte.be/eng/graphix/clearpix.gif
 Updated: Jan 08, 2006
 
   
 ... so is there an ongoing effort?  Is there a product that I can 
 download at a cost or (hopefully) for free?  The page shows the 
 donations from 2002 to 2005 so perhaps it has been abandoned, 
 superceded or whatever.
  
 Anyway, can someone point me in the right direction - a site with 
 downloads and costs etc.?
  
 Cheers
  
 Jeff
 
 --
 
 Jeff Cook
 
 The Cooks Oasis
 
 The Cooks Ltd
 
 Phone: +682 28 213
 
 Skype: jeffraro
 
 www.cookislandsoasis.com http://www.cookislandsoasis.com/
 
  
 http://fta.firetrust.com/index.cgi?id=jeffraroamp;page=1amp;campaig
 n=
 aspect_email I use and recommend MailWasher Pro to keep my mailbox
 clear of SPAM
 
  
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list please
goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] ICS and SSL

2008-04-29 Thread Jeff Cook
Hi
 
This is probably a misuse of this list as I gather there is one devoted
to SSL  however since I already belong to this one and I guess the
main players in SSL are here too, here goes.
 
I'm confused about how I go about using ICS for an SMTP client connected
to a mail server that uses SSL.   I have googled around and end up on a
page asking for contributions to the development effort - problem there
- but I see the page says
 
ICS - SSL Effort
  http://www.overbyte.be/eng/graphix/clearpix.gif 
Updated: Jan 08, 2006


... so is there an ongoing effort?  Is there a product that I can
download at a cost or (hopefully) for free?  The page shows the
donations from 2002 to 2005 so perhaps it has been abandoned, superceded
or whatever.
 
Anyway, can someone point me in the right direction - a site with
downloads and costs etc.? 
 
Cheers
 
Jeff

--

Jeff Cook

The Cooks Oasis

The Cooks Ltd

Phone: +682 28 213

Skype: jeffraro

www.cookislandsoasis.com http://www.cookislandsoasis.com/  

 
http://fta.firetrust.com/index.cgi?id=jeffraroamp;page=1amp;campaign=
aspect_email I use and recommend MailWasher Pro to keep my mailbox
clear of SPAM

 
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Sending mail with SMTPClient including images

2008-04-17 Thread Jeff Cook
Back again after a spell of frantically doing other stuff ...

I do indeed have the THtmlSmtpClient, but am perplexed as to how to use
it.  

I have my RichEdit with (or without) images, and I can see that:-

TSmtpClient has a property MailMessage
and
THtmlSmtpClient has EmailImages and HtmlText

... But what to I do with them.

Currently I use:-
 
procedure TSMTPMailMsgForm.SmtpClientGetData(Sender: TObject;
  LineNum: Integer; MsgLine: Pointer; MaxLen: Integer; var More:
Boolean);
var
  Len: Integer;
begin
  if LineNum  sl.Count then
More := FALSE
  else begin
Len := Length(sl.Strings[LineNum - 1]);
{ Truncate the line if too long (should wrap to next line) }
if Len = MaxLen then
  StrPCopy(MsgLine, Copy(sl.Strings[LineNum - 1], 1, MaxLen - 1))
else
  StrPCopy(MsgLine, sl.Strings[LineNum - 1]);
  end;
end;

... To feed the lines from string list sl 

Any help appreciated

TIA

Jeff

--
Jeff Cook
Aspect Systems Ltd
Phone: +682 28 213
Skype: jeffraro
www.aspect.co.nz 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Wilfried Mestdagh
Sent: Tuesday, 8 April 2008 8:10 p.m.
To: ICS support mailing
Subject: Re: [twsocket] Sending mail with SMTPClient including images


Hello Jeff,

You should have it installed unless you have a very old version of ICS.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, April 8, 2008, 21:59, Jeff Cook wrote:

 Kia Orana Wilfred

 Perhaps THtmlSmtpClient is just what I need - I'm not very bright in

 the email/html department, so a component that does it all for me 
 sounds the thing for me!

 BUT ... I can't find it anywhere - tried Googling with no success.

 Any pointers as to where I'd find it - I'm developing with Delphi 6 if

 that makes any difference.

 Meitaki Ma'ata

 Kia Manuia

 Jeff
 --
 Jeff Cook
 The Cooks Oasis
 The Cooks Ltd
 Phone: +682 28 213
 Skype: jeffraro
 www.cookislandsoasis.com
 


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 On Behalf Of Wilfried Mestdagh
 Sent: Monday, 7 April 2008 8:57 p.m.
 To: ICS support mailing
 Subject: Re: [twsocket] Sending mail with SMTPClient including images


 Hello Jeff,

 the image gets stripped on the way out.  I DON'T want to have the 
 image sent as an attachment (can already do that) but want it in the 
 body of the email itself.

 The HTML part is an attachment and the images are also attachments. If
 you want the images in the html document you have to reference them in
 the html document in the right sequence.

 A correct email also have a plain text. So if you want to send HTML
 email with a reference to an image you put the plain text in the body,
 the HTML as attachment and the image also.

 Check also THtmlSmtpClient. I think as the name say it will handle a
 large part of it for you.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 -- 
 To unsubscribe or change your settings for TWSocket mailing list
please
 goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Sending mail with SMTPClient including images

2008-04-08 Thread Jeff Cook
Kia Orana Wilfred

Perhaps THtmlSmtpClient is just what I need - I'm not very bright in
the email/html department, so a component that does it all for me sounds
the thing for me!

BUT ... I can't find it anywhere - tried Googling with no success.

Any pointers as to where I'd find it - I'm developing with Delphi 6 if
that makes any difference.

Meitaki Ma'ata

Kia Manuia

Jeff
--
Jeff Cook
The Cooks Oasis
The Cooks Ltd
Phone: +682 28 213
Skype: jeffraro
www.cookislandsoasis.com 
 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Wilfried Mestdagh
Sent: Monday, 7 April 2008 8:57 p.m.
To: ICS support mailing
Subject: Re: [twsocket] Sending mail with SMTPClient including images


Hello Jeff,

 the image gets stripped on the way out.  I DON'T want to have the 
 image sent as an attachment (can already do that) but want it in the 
 body of the email itself.

The HTML part is an attachment and the images are also attachments. If
you want the images in the html document you have to reference them in
the html document in the right sequence.

A correct email also have a plain text. So if you want to send HTML
email with a reference to an image you put the plain text in the body,
the HTML as attachment and the image also.

Check also THtmlSmtpClient. I think as the name say it will handle a
large part of it for you.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
To unsubscribe or change your settings for TWSocket mailing list please
goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Sending mail with SMTPClient including images

2008-04-07 Thread Jeff Cook
Hi
 
Currently I have a program that works 99% OK ;-)
 
I compose a rich text email in 
 
BodyText: TJvRichEdit;
 
and I send it with code like this:-
 
  if BodyText.PlainText then sl.Text := BodyText.Text
  else Common.JvRichEditToHtml.ConvertToHtmlStrings(BodyText, sl);

where sl is a TStringList.
 
Then (code that was straight out of an example) :-
 
procedure TSMTPMailMsgForm.SmtpClientGetData(Sender: TObject;
  LineNum: Integer; MsgLine: Pointer; MaxLen: Integer; var More:
Boolean);
var
  Len: Integer;
begin
  if LineNum  sl.Count then
More := FALSE
  else begin
Len := Length(sl.Strings[LineNum - 1]);
{ Truncate the line if too long (should wrap to next line) }
if Len = MaxLen then
  StrPCopy(MsgLine, Copy(sl.Strings[LineNum - 1], 1, MaxLen - 1))
else
  StrPCopy(MsgLine, sl.Strings[LineNum - 1]);
  end;
end;

Now this works and we get nicely formatted emails sent out.  EXCEPT when
the user puts an Image into the BodyText (TJvRichEdit).
 
In this case the image is simply dropped.
 
I'm hoping that there is a simple solution that doesn't involve
rewriting too much !

--

Jeff Cook

The Cooks Oasis

The Cooks Ltd

Phone: +682 28 213

Skype: jeffraro

www.cookislandsoasis.com http://www.cookislandsoasis.com/  

 
http://fta.firetrust.com/index.cgi?id=jeffraroamp;page=1amp;campaign=
aspect_email I use and recommend MailWasher Pro to keep my mailbox
clear of SPAM

 
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Sending mail with SMTPClient including images

2008-04-07 Thread Jeff Cook
Hi Dod

I understand this bit (I think):-

 but an image in a mail is a  BASE64  encoded  attachement  so  if  you

 convert HTMLToString then you'll  only  get  the  HTML  text part of
your mail, not the attached binary files like 
 images.

But here, I'm not with you

 To do this you may have to decode attached picture into its orignal
non BASE64 
 fomrmat then load it into you RichEdit.

... Because I have already loaded the image  (Code below).

The effect I'm trying to get is exactly like (say) MS Outlook where, in
HTML format mails, you can enter formatted text and past images e.g. a
screen shot.  I can get that far with what I have written, except that
the image gets stripped on the way out.  I DON'T want to have the image
sent as an attachment (can already do that) but want it in the body of
the email itself. 

Cheers

Jeff

This is how the image gets into the richedit:-

  i := 0;
  while i = 0 do
  begin
i := BodyText.FindText('{Other|Photo}', 0, MaxInt, []);
if i = 0 then
begin
  BodyText.SelStart := i;
  BodyText.SelLength := 13;
  with Common.dlgOpenPicture do
  begin
InitialDir := Common.GetPreference('Photo Location');
if Execute then
begin
  Pict := TPicture.Create;
  try
Pict.LoadFromFile(FileName);
BodyText.InsertGraphic(Pict.Graphic, True);
  finally
Pict.Free;
  end;
end
else break;
  end;
end;
  end;
  


JC Hi
 
JC Currently I have a program that works 99% OK ;-)
 
JC I compose a rich text email in
 
JC BodyText: TJvRichEdit;
 
JC and I send it with code like this:-
 
JC   if BodyText.PlainText then sl.Text := BodyText.Text
JC   else Common.JvRichEditToHtml.ConvertToHtmlStrings(BodyText, 
JC sl);

JC where sl is a TStringList.
 
JC Then (code that was straight out of an example) :-
 
JC procedure TSMTPMailMsgForm.SmtpClientGetData(Sender: TObject;
JC   LineNum: Integer; MsgLine: Pointer; MaxLen: Integer; var More: 
JC Boolean); var
JC   Len: Integer;
JC begin
JC   if LineNum  sl.Count then
JC More := FALSE
JC   else begin
JC Len := Length(sl.Strings[LineNum - 1]);
JC { Truncate the line if too long (should wrap to next line) }
JC if Len = MaxLen then
JC   StrPCopy(MsgLine, Copy(sl.Strings[LineNum - 1], 1, MaxLen -
1))
JC else
JC   StrPCopy(MsgLine, sl.Strings[LineNum - 1]);
JC   end;
JC end;

JC Now this works and we get nicely formatted emails sent out.  EXCEPT 
JC when the user puts an Image into the BodyText (TJvRichEdit).
 
JC In this case the image is simply dropped.
 
JC I'm hoping that there is a simple solution that doesn't involve 
JC rewriting too much !

JC --

JC Jeff Cook

JC The Cooks Oasis

JC The Cooks Ltd

JC Phone: +682 28 213

JC Skype: jeffraro

JC www.cookislandsoasis.com http://www.cookislandsoasis.com/

 
JC
http://fta.firetrust.com/index.cgi?id=jeffraroamp;page=1amp;campaign=
aspect_email I use and recommend MailWasher Pro to keep my mailbox
JC clear of SPAM


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Ping stopped working - in fact kills the program first!

2006-09-12 Thread Jeff Cook
Hi
 
I have been making some program changes in the same module as a Ping
procedure.
 
On creating the module I now get an error:-
 
Exception EReadError in ...
Error reading Ping.OnDnsLookupDone: Invalid property value.
 
In the .dfm module the Ping looks like this :-
 
  object Ping: TPing
Size = 56
Timeout = 4000
TTL = 64
Flags = 0
OnDnsLookupDone = PingDnsLookupDone
Left = 188
Top = 82
  end

The error goes away if I disconnect the event.  I'm not aware of making
any change in the Ping area - but I have obviously upset something.  I
suspect that this has nothing at all to do with ICS - but have no idea
what is wrong.  Any ideas?
 
Cheers
 
Jeff
 
P.S. Delphi 6 - not sure what version of ICS (can't see a version number
anywhere).
--

Jeff Cook

Aspect Systems Ltd

Phone: +64-9-424 5388

Skype: jeffcooknz

HYPERLINK http://www.aspect.co.nz/www.aspect.co.nz

 

 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.406 / Virus Database: 268.12.3/446 - Release Date:
12/09/2006
 
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SMTP demo and RichText

2006-05-16 Thread Jeff Cook
Thank you Francois and Arno

I'll take your advice and use HTML - for the reasons Francois gave about
many email client not supoorting it - but also because I've already
solved the problems of converting RTF to HTML for our bulk emails.  One
downside of doing so is that pretty rich text letters keyed by the
user don't always convert into very nice looking HTML (certainly not
WYSIWYG) - and I haven't yet addressed the problems of embedded images
in the RTF getting converted to HTML.

Cheers

Jeff

P.S. And I think I'd better upgrade ICS to the latest version to see
your MailHTML sample

--
Jeff Cook
Aspect Systems Ltd
Phone: +64-9-424 5388
Skype: jeffcooknz
www.aspect.co.nz
 


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Arno Garrels
 Sent: Tuesday, 16 May 2006 7:22 p.m.
 To: ICS support mailing
 Subject: Re: [twsocket] SMTP demo and RichText
 
 
 Francois Piette wrote:
 
  btw: RTF message is not a very good idea. Many email client doesn't 
  support it. You'd better use HTML messages which are demoed in 
  MailHtml sample provided with ICS.
 
 If you are looking for a free html editor you may try
 Kurt Senfer's ActiveX component, available in the files 
 section, for subscribers only: 
 http://groups.yahoo.com/group/delphi-dhtmledit
 
 ---
 Arno 
 Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date:
16/05/2006
 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] SMTP demo and RichText

2006-05-15 Thread Jeff Cook
Hi
 
I'm trying out the MailSnd demo - trying to adapt it to send mail as
Rich Text.  
 
I've changed the MsgMemo to a TJvRichEdit and have tested by pasting in
some rich text - e.g. my sig below is in Comic Sans MS and I can paste
this into the message area and retain the font size etc.  
 
But when I send the mail to myself, I receive it stripped down to plain
text.  I've tried changing the ContentType to HTML but it doesn't help
(makes it worse by stripping out the CR/LF's.
 
I assume that the problem lies somewhere in procedure
TSmtpTestForm.SmtpClientGetData ... but have no idea how to proceed.  
 
Is there an easy way?  I have got ScroogeXHTML which converts a subset
of RTF to HTML - but I really want to be able to email everything in the
RichEdit.
 
TIA
 
Jeff
 
P.S. Long time user of ICS but first time user of this elist.
 
P.P.S.  Not sure how to tell what version I have - the source seems to
be dated  2001-05-19 if that helps - can't see a version number anywhere
and I am using Delphi 6 Pro.
 

--

Jeff Cook

Aspect Systems Ltd

Phone: +64-9-424 5388

Skype: jeffcooknz

HYPERLINK http://www.aspect.co.nz/www.aspect.co.nz

 

 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.392 / Virus Database: 268.5.6/340 - Release Date:
15/05/2006
 
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be