Navision Application Server & MSMapi problem

kuju
Member, Microsoft Employee Posts: 62
Hi,
I do have a problem with nas & msmapi.
When i run a codeunit in foreground from a navision client which has to send an email using msmapi the email is being succesful send.
When i run this same codeunit in a nas with the same (Windows)user on the same machine the mail is not send.
Here is my code :
When i go and look in the event log the last message is "before sending" and the nas is hanging and doing nothing ....
First i assumed it has something to do with profiles but i checked this. I also tryed this with the outlook app open and closed!
Anyone ????
I do have a problem with nas & msmapi.
When i run a codeunit in foreground from a navision client which has to send an email using msmapi the email is being succesful send.
When i run this same codeunit in a nas with the same (Windows)user on the same machine the mail is not send.
Here is my code :
MAPISession.DownLoadMail := FALSE; IF MAPISession.SessionID = 0 THEN BEGIN IF NOT GUIALLOWED THEN BEGIN IF "E-Mail Profile Name" = '' THEN BEGIN recKTNNASApplication.RESET; recKTNNASApplication.SETCURRENTKEYCode,Application,Company); recKTNNASApplication.SETRANGE(Code,'BACKGROUND'); recKTNNASApplication.SETRANGE(Application,'KTN'); recKTNNASApplication.SETRANGE(Company,COMPANYNAME); IF recKTNNASApplication.FIND('-') THEN "E-Mail Profile Name" := recKTNNASApplication."E-Mail profile name"; END; MAPISession.UserName := "E-Mail Profile Name"; MAPISession.LogonUI := FALSE; END; MAPISession.SignOn; END; MAPIMessages.SessionID := MAPISession.SessionID; MAPIMessages.Compose; fct_SetNames(1,ToName); MESSAGE('set names'); fct_SetNames(2,CCName); MESSAGE('set names2'); MAPIMessages.MsgSubject := Subject; MESSAGE('set subject'); NoOfAttachments := 0; WHILE AttachFileName[NoOfAttachments + 1] <> '' DO NoOfAttachments := NoOfAttachments + 1; IF NoOfAttachments = 0 THEN BEGIN MAPIMessages.MsgNoteText := Body; MESSAGE('body'); END ELSE BEGIN MESSAGE('%1',NoOfAttachments); MESSAGE('%1',AttachFileName[1]); MAPIMessages.MsgNoteText := Body + PADSTR('',NoOfAttachments); // reserve positions for multiple attachments FOR i := 1 TO NoOfAttachments DO BEGIN MAPIMessages.AttachmentIndex := i - 1; MAPIMessages.AttachmentType := 0; MAPIMessages.AttachmentPathName := AttachFileName[i]; MAPIMessages.AttachmentPosition(STRLEN(Body) + i - 1); END; END; MESSAGE('before sending'); MAPIMessages.Action(3); // Send or //MAPIMessages.Send; MESSAGE('after sending');
When i go and look in the event log the last message is "before sending" and the nas is hanging and doing nothing ....
First i assumed it has something to do with profiles but i checked this. I also tryed this with the outlook app open and closed!
Anyone ????
Dynamics Rules!
0
Comments
-
Have you installed Outlook 2000 ???
The components used for mail in NAS seem to need an extended mapi that ships with outlook 2000.
Of course (?) this is if you're using windows 2000, on Windows NT 4 the extended mapi comes with standard installation0
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