mail with attachment

Chilango
Member Posts: 5
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
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
-
This forum is for placing Tips&Tricks only, not for support. You might be more successful to ask your question in the Navision Developer section of this Forum and read the many postings which have already been written about MAPI issues.
MarcusWith best regards from Switzerland
Marcus Fabian0 -
hi mate you can use this code
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);Naushad Alam
Consultant -Navision
All e Technologies (P) Ltd.
Building Solutions for Extended Enterprises
www.alletec.com0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions