What happens? I cannot send mail with attachments

Comments about application
cmx8818
Posts: 9
Joined: 17 Jun 2007 10:43

What happens? I cannot send mail with attachments

Postby cmx8818 » 17 Jun 2007 10:57

Hello Miha,

Many thanks for your great work for providing us such a great Mail Client.

But, I found a curious matter.

I composed a new mail and attached some files(i.e., .xls files) , then sent it right now. The mail is sent but without attachment. Anymore, the exact mail listed in the maillist view was not displayed with the attached icon, but with the same mail, if I sent it by queue way, it was displayed WITH ATTACHED ICON, but still sent without any attachments.

I am so confused. I tried many si.Mail versions.

Could you please tell me why?

Regards

Michael Chan

mvrhov
Site Admin
Site Admin
Posts: 884
Joined: 12 Jul 2003 21:15
Location: Kranj, Slovenia
Contact:

Re: What happens? I cannot send mail with attachments

Postby mvrhov » 17 Jun 2007 11:50

AFAIR the only problem with files not beeing attached especially M$ ones (*.xls, *.doc, ...)is when they are opened by Word, Excel....

Regards,
Miha

cmx8818
Posts: 9
Joined: 17 Jun 2007 10:43

Re: What happens? I cannot send mail with attachments

Postby cmx8818 » 17 Jun 2007 13:01

Thanks for your reply.

But I have tested all most probable reasons (including what you mentioned) that may cause such result. However, no matter what kind of file, attachment could not be mailed correctly, si.Mail can just mail text body. I had examined detaily the code, I doubted the reason maybe as: attachment subpart were not attached correctly.

I doubted the code listed:

I uses D6
siMail version: si.Mail_src_0.6.1.115
unit: fCompose.unit

Code: Select all

function TfrmCompose.buildMessage(FinnishLater: Boolean; SaveStream: TStream): Integer;
  ...........
  //process attached files
  if lstAttachments.RootNodeCount = 0 then begin //no attachments
    case cmboxMsgType.ItemIndex of
      0:
      begin //plain text only
        mime.AddPartText(txtMessage.Lines.Text, nil);
      end;
    end;
  end
  else begin
    mimeMulti := mime.AddPartMultipart('mixed', nil);
    case cmboxMsgType.ItemIndex of
      0:
      begin //plain text only
        mime.AddPartText(txtMessage.Lines.Text, mimeMulti);
      end
    end;

    //add attachments to list
    node := lstAttachments.GetFirst;
    while node <> nil do begin
      at := PTreeAttach(lstAttachments.GetNodeData(node));
     //**************
     if at^.mime = nil then begin
        mime.Header.AttachList.AddObject(AnsiToUtf8(at^.fileName), Pointer(Integer(node.CheckState = csCheckedNormal)));
        descr.status := descr.status + [msgAttachmentOutside];
      end
      else begin
        descr.status := descr.status + [msgAttachmentInside];
        mime.AddPart(mimeMulti).Assign(at^.mime);
      end;
     //**************
    node := lstAttachments.GetNext(node);
    end;
  end;

the above italic lines I think is just the point.

But I could not explain why mails recv. could be decomposed correctly?

Regards

Michael Chan

admin: added code into code section

mvrhov
Site Admin
Site Admin
Posts: 884
Joined: 12 Jul 2003 21:15
Location: Kranj, Slovenia
Contact:

Re: What happens? I cannot send mail with attachments

Postby mvrhov » 17 Jun 2007 13:36

This is really really old code. And you are the first one who is saying that is having problems no matter if file is opened or closed.

Regards,
Miha

cmx8818
Posts: 9
Joined: 17 Jun 2007 10:43

Re: What happens? I cannot send mail with attachments

Postby cmx8818 » 17 Jun 2007 13:43

I have tested the newest version. The same problem remains.

regards

cmx8818
Posts: 9
Joined: 17 Jun 2007 10:43

Re: What happens? I cannot send mail with attachments

Postby cmx8818 » 17 Jun 2007 16:09

I got it!

My os is Simplified Chinses(GB2312), some problems exists in system.AnsiToUtf8 and system.Utf8ToAnsi procedure when dealing with chinese charset.

I have fixed the bugs.

thanks a lot

Regards

Michael Chan


Return to “General Discusion”

Who is online

Users browsing this forum: No registered users and 1 guest