Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 01 MAR 2000 07:19:02PM Frank Tomeo wrote:

I am currently trying to set up some simple email functionality using OI and the MAPI commands. Basically, I'd like OI to auto-generate and send an email based on certain criteria. We are using Outlook Express as our regular email program. I have followed similar threads on how to accomplish the MAPI (and VIM) commands but I continue to run into the same problem. After attempting to send a test email message I receive the following error:

"Either there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail client."

It will show this message ten times, then it ends with:

"OIMAP02: General Failure"

Outlook Express IS set up as my default mail client, however I am somewhat uneducated on client MAPI configurations other than the standard "Options", "Set as Default Mail Handler". There is a service listed under the "Config", "Mail" setting and I verified that all POP and SMTP settings matched that of my Outlook Express settings. Any help will be appreciated.

[email protected]

SRP Computer Solutions


At 02 MAR 2000 02:18PM Frank Tomeo wrote:

After re-adjusting some client settings, I was able to get past the original error message I was receiving. My code successful gets past the MAPILogon command, but when it hits the MAPISendMail command, I am still receiving the following:

OIMAPI02: General failure

The following is the section of code that I am using to attempt to generate the email:

If MAPILogon(Session) then

Get_Status(ErrMsg)
Msg(@Window, ErrMsg)

end

Txt=This is a test message generated by OI."

Message='

Message=Test"

[email protected]"

Message=Txt

Message=IPM."

If MAPISendMail(Session, 0, "", Message) then

Msg(@Window, "Message sent successfully!")

end else

Get_Status(ErrMsg)
Msg(@Window, ErrMsg)

end

Any further help would be appreciated.

[email protected]

SRP Computer Solutions


At 03 MAR 2000 12:03PM WinWin/Revelation Technical Support wrote:

Frank-

It's probably your type parameter. Try this:

Subroutine Mapi_test(Dummy)

Declare Function Unassigned, Set_Status, Get_Status

declare subroutine Msg, Get_Status

declare function MapiSendMail, MapiLogon, MapiLogoff

$insert Mapi_Equates

equ CRLF$ to \0D0A\

equ CR$ to \0D\

equ LF$ to \0A\

equ TAB$ to \09\

Txt =This is a test message." : CRLF$

Txt =Please do not respond." : CRLF$

Flags=MAPI_LOGON_UI$ + MAPI_DIALOG$

Message='

Message=Test- Please Ignore"

[email protected]"

Message=Txt

Message=MAPI_RECEIPT_REQUESTED$

Message=IPM.Microsoft Mail.Note"

Session_Id='

password ='

flags ='

if Session_ID=' Then

x=Set_Status(0)
check=MAPILogon(session_id, parent, 'USERNAME', 'PASSWORD', MAPI_NEW_SESSION$)
if Get_Status(ErrCode) then
	Call FsMsg()
end

End else

check=1

End

if check then

FLAGS='
Flags=MAPI_LOGON_UI$
if MAPISendMail(session_id, 0, Flags, Message) then
  Msg(@window, "Message sent successfully!")
end else
  Get_Status(ErrMsg)
  Msg(@window, ErrMsg)
end
x=MapiLogoff(Session_id)

End else

Get_Status(ErrMsg)
Msg(@window, ErrMsg)

End


At 03 MAR 2000 01:00PM Frank Tomeo wrote:

Thanks. I tried that as well and it did not help, although there are somethings you are doing in your code that I am not. There is also a Rev Tech Notes document that says that it is a mistake to use "IPM.Microsoft.Mail.Note" as a type (search for IPM and you'll find it). I've also read some threads that say to just use "IPM.Note". Why the conflicting information? What does this type parameter actually accomplish?

  What I found out was one of my problems is that Outlook Express uses SMAPI, which I don't think OI likes.  I had to set up regular Outlook as the default client, and then everything ran like I wanted it too.  The only problem is that I would have liked to keep Express as the default client.  If there is any way to get OI to work with SMAPI (and Express), I am open to any suggestions.

Thanks again,

[email protected]

SRP Computer Solutions

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/e98014f61b38b205852568960001be2e.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1