1. David Tozer
  2. PowerBuilder
  3. Tuesday, 12 October 2021 02:01 AM UTC

I would like to send a mailing to people who attended a conference that I was involved in organizing.  It seems I can't get the mail session started.

I have the following code in PowerBuilder.

mailsession                lms_1
mailrecipient            lmr_1
mailMessage            lmmsg
mailFileDescription        lmfd
mailReturnCode        mRet

lms_1 = CREATE mailsession
mRet = lms_1.mailLogon ()

The return code (mRet) is mailReturnFailure!

When I create the object the sessionid = 0.

The PowerBuilder version I have is 2021.

My OS is Windows 10 64bit.  It is up to date and I have Office 365 (Outlook) installed.

The ini file is updated with the addition of "UseSimpleMAPI=yes" to the [PB] section.

Can anyone tell me what I am missing to get the mail working.

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 13 October 2021 12:32 PM UTC
  2. PowerBuilder
  3. # 1

You could also use OLE instead of mailmapi. Both 32 and 64 bits Office will work.

Comment
  1. David Tozer
  2. Friday, 15 October 2021 03:31 AM UTC
I can send email from my app. Great. Thanks for the help.
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 12 October 2021 11:41 AM UTC
  2. PowerBuilder
  3. # 2

We recently faced a similar situation. The reason in our case was related to the exe being compiled at 32-bit while installed version of outlook on the same machine was a x64. What we did: we replaced that functionallity with a c# implementation of the same logic in a class. Then we used dll importer to use our c# class. And it worked fine. Another solution is to install office x86 when you need to use mapi with your 32bit applications.

Andreas.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 12 October 2021 03:19 AM UTC
  2. PowerBuilder
  3. # 3

If you do a search on “maillogon” you’ll find several related questions like this one: https://community.appeon.com/index.php/qna/q-a/mapi-session-maillogon-returns-failure

regards

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.