Sending more than 1 word-attachments (blob-fields) in e-mail

vanwerovanwero Member Posts: 28
edited 2005-08-02 in Navision Attain
Hi,

does anybody know if it's possible to sent an email with more than one word-attachment (these attachments are BLOB-fiels whithin Navision)

Thx
R.

Comments

  • Dean_AxonDean_Axon Member Posts: 193
    Yes it can be done 8)

    By Creating a new function in codueint 397 (Mail) based on the "New Message". You need to add multiple "AttachfileName" routines.

    When I did this it was referencing files on my local C drive that I had created by using "SAVEASHTML" and then sending these to my required contact.

    Dean.

    P.S. I found the code and it looks something like this....


    IF AttachFileName2 = '' THEN
    MAPIMessages.MsgNoteText := Body
    ELSE BEGIN
    MAPIMessages.MsgNoteText := Body + ' ';
    MAPIMessages.AttachmentIndex := MAPIMessages.AttachmentCount;//Counts the no. of messages attached to the mail
    MAPIMessages.AttachmentType := 0; //defines the attachment type as Data File
    MAPIMessages.AttachmentPathName := AttachFileName2;
    MAPIMessages.AttachmentPosition(STRLEN(Body));
    END;
    Remember: Keep it simple
  • vanwerovanwero Member Posts: 28
    Thank you very much, this is indeed the place where it can be done. One problem. My MAPIHandler is declared as the following automation variable --> 'Navision Attain ApplicationHandler'.MAPIHandler'.

    But for this variable I do not have the following properties: AttachmentIndex, AttachmentType,...

    Does anybody know if this is het wrong variable declaration or something else I do wrong?

    By the way, I'm working in 3.70. Mayby this is the cause? If this is the case, does anybody knows how to do it in this Version?

    Greets,
    R.
  • JanVJanV Member Posts: 34
    Hello everybody,
    we were(are) having the same problem. Using this code works fine, so far, but only as long as we're not sending more then two attachments.

    Is this Mapi-OCX limited to two attachments?? Or what are doing wrong?

    ](*,)
  • JanVJanV Member Posts: 34
    Ok, now we got it. It was just the attachment position which was wrong...
  • Timo_LässerTimo_Lässer Member Posts: 481
    JanV wrote:
    Ok, now we got it. It was just the attachment position which was wrong...
    Could you explain which position is wrong and which is correct?
    I can't imagine that the position of the attachment(s) will be important. :-k
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • JanVJanV Member Posts: 34
    We're attaching several different files (for example File A, File B, File C) for every Salesperson.
    But we forgot to set the attachment position for every attached file, actually we were just giving one position (len(body) at the end of the "attachment-part" (like in the example).

    Speaking of it; now we're having the problem that we can't send more then 18 attachments in one E-mail. Any suggestions?
Sign In or Register to comment.