Hi,
I would like to send e-mails with more than one attach. So I had
modified the codeunit mail (397). When I do not use text I could
not order the attachments and when I am trying to modifiy the
function I get errors in the mailing system.
//-002
IF DateiNameAnhängen2 <> '' THEN BEGIN
MAPIMitteilungen.AttachmentIndex := MAPIMitteilungen.AttachmentCount;
MAPIMitteilungen.AttachmentType := 0;
MAPIMitteilungen.AttachmentPathName := DateiNameAnhängen2;
// MAPIMitteilungen.AttachmentPosition();
END;
//+002
Thank you very much
for helping
0
Comments
Marcus
Marcus Fabian
NewMessage(ToName : Text[80];Subject : Text[250];Body : Text[250];AttachFileName1 : Text[250];AttachFileName2 : Text[250])
MAPISession.DownLoadMail := FALSE;
IF MAPISession.SessionID = 0 THEN BEGIN
IF "E-Mail Profile Name" <> '' THEN BEGIN
MAPISession.UserName := GetProfileName();
MAPISession.LogonUI := FALSE;
END;
MAPISession.SignOn;
END;
MAPIMessages.SessionID := MAPISession.SessionID;
MAPIMessages.Compose;
SetNames(1,ToName);
MAPIMessages.MsgSubject := Subject;
IF AttachFileName1 = '' THEN
MAPIMessages.MsgNoteText := Body
ELSE BEGIN
MAPIMessages.MsgNoteText := Body + ' ';
MAPIMessages.AttachmentIndex := MAPIMessages.AttachmentCount;
MAPIMessages.AttachmentType := 0;
MAPIMessages.AttachmentPathName := AttachFileName1;
IF AttachFileName2 <>'' THEN BEGIN
MAPIMessages.AttachmentIndex :=MAPIMessages.AttachmentIndex +1;
MAPIMessages.AttachmentPathName := AttachFileName2;
END;
MAPIMessages.AttachmentPosition(STRLEN(Body));
END;
MAPIMessages.Action(3);
Consultant -Navision
All e Technologies (P) Ltd.
Building Solutions for Extended Enterprises
www.alletec.com