[solved] NAS and MAPI Error

ta5ta5 Member Posts: 1,164
Hi
We have a codeunit that sends mail via MSMAPI.
It runs without problems it started from a normal client. If started from NAS an error occurs. We are using Outlook2000 and Navision 4.01

Long time ago, in this forum was a similar question, unfortunatley without solution for my problem:
http://www.mibuso.com/forum/viewtopic.php?t=1198

NewMail(Subject : Text[250];OpenSession : Boolean)
CLEAR(TotalBodyLen);
CLEAR(AnzahlBody);
CLEAR(BodyArr);
AnzahlBody := 1;
IF OpenSession THEN BEGIN
  MAPISession.DownLoadMail := FALSE;
  IF (MAPISession.SessionID = 0) THEN
    MAPISession.SignOn;
  MAPIMitteilungen.SessionID := MAPISession.SessionID;
END;

MAPIMitteilungen.Compose;

MAPIMitteilungen.MsgSubject := Subject;

The error message is:
The call to Member SignOn failed. MAPISession returned the following:
Not supported


Any help is hiqhly appreciated.
Thomas

Comments

  • Soft_TodSoft_Tod Member Posts: 43
    Hi Thomas.

    Is it possible that the NAS runs with another Windows-Account and therefor fails?

    If its MS Outlook 2000 and not Outlook Express 2000 you are using, it could be a permission issue which comes from the Exchange Server.
    It is impossible to make anything foolproof, because fools are so ingenious.
  • ta5ta5 Member Posts: 1,164
    Hi
    Thx for your answer. The user starting the service (login as) is the same as the current logged in windows user.

    Outlook express: Do you have more details concerning this issue?
  • Soft_TodSoft_Tod Member Posts: 43
    Well, its an issue that goes back to WebShop (Navision 2.65), and it's my theory so I can't give you any facts about it.

    MS Outlook is considered as a personal information DB and default to high security. As far as I now, you have to administer the Exchange Server to change rights.

    Outlook Express is more like "only" a mailsystem and allow services to log on without any difficulties.

    When we install Commerce Portal, we therfor always use Outlook Express.

    Regards
    Soft Tod
    It is impossible to make anything foolproof, because fools are so ingenious.
  • Bjarne_AstrupBjarne_Astrup Member Posts: 11
    Hi Thomas,

    You must set the profile name. You can find the profile name in Mail in Control Panel.
    IF (MAPISession.SessionID = 0) THEN BEGIN
      MAPISession.UserName := ProfileName;
      MAPISession.LogonUI := FALSE;    
      MAPISession.SignOn; 
    END;
    

    Regards
    Bjarne
  • ta5ta5 Member Posts: 1,164
    Hi Bjarne
    This was the trick. You saved me lots of headache :D
    Regards
    Thomas
Sign In or Register to comment.