Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Oct : Why doens't this work??

www.cryer.info
Managed Newsgroup Archive

Why doens't this work??

Subject:Why doens't this work??
Posted by:"Del Murray" (del.murr..@credithawk.net)
Date:Mon, 8 Oct 2007 16:03:41

I put the following code into a forms "on activate" event. It is the only
thing in the program.

   try
   mServer.QuickSend('smarthost.coxmail.com',
      'subject is this', 'del.murray@credithawk.net',
'messenger@credithawk.net',
      'This is the body');
   except
      on e:exception do begin
         showmessage(e.message);
      end;
   end;


I doens't throw an exception but the email never goes out.
THis works fine in a ISAPI but not a GUI.
I tried this as a test because the followin code does the same thing ..
doesn't go anywhere.

   //Send Mail right here. and attach report

   sSmtp.Disconnect;
   sSMTP.host := gSMTPServer;
   sSMTP.Port  := 25;
   MailMessage.from.address := gSMTPSender;
   MailMessage.Recipients.EMailAddresses := 'del.murray@credithawk.net';

   MailMessage.Subject   := 'From Del with attachment.';
   MailMessage.Body.text := 'try this.';

   tidattachment.Create(mailmessage.messageparts,vRpt);

   try
      sSMTP.Connect;
      sSMTP.send(mailmessage);
   except
      on e:exception do begin
         showmessage(e.message);
      end;
   end;
   sSMTP.disconnect;

This is INDY9 in a Delphi5 program.
Anyone have a clue ???

Replies:

www.cryer.info
Managed Newsgroup Archive