Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Jun : indy9 mail attachment error

www.cryer.info
Managed Newsgroup Archive

indy9 mail attachment error

Subject:indy9 mail attachment error
Posted by:"Sean Hwa" (seanh..@hotmail.com)
Date:Wed, 8 Jun 2005 16:16:50

I send mail by indy (idmessage ,idsmtp  ver 9.0.18)
I receive mail by OuterExpress ,and can't extact the correct attachment ,
I compared and found ,the mail_attachment is larger then source file
It was added 8-16 bit at the end of mail_attachment.

what's the mistake in my code ?

Best Regard

Sean Hwa

========================================================
the following code is  part of my mail send prg

    with IdMessage1  do begin
      Priority := mpHigh;
      Body.Clear;
      Body.Append('some text');
      sender.Text:= dbmain.UserName  +' <'+dbmain.UserEmail+'>';
      from.Text:= sender.Text;
      Subject := 'title' ;
      vattfile := extractfilepath(paramstr(0))+ 'info.epi';
      MessageParts.Clear;
      LTheAttachment := TIdAttachment.Create(MessageParts,vattfile);
      LTheAttachment.ContentTransfer :=  'base64';
      LTheAttachment.ContentType := 'multipart/mixed';
      end;

      IdSMTP1.Port := dbmain.SmtpServerPort;
      IdSMTP1.Host := dbmain.SmtpServerName;
      IdSMTP1.Password := dbmain.SmtpServerPassword;
      IdSMTP1.Username := dbmain.SmtpServerUser;

      if dbmain.SmtpAuthType = 1 then
        IdSMTP1.AuthenticationType := atLogin
      else
        IdSMTP1.AuthenticationType := atnone;

Replies:

www.cryer.info
Managed Newsgroup Archive