1. Sverre Tvedt
  2. PowerBuilder
  3. Thursday, 15 August 2019 12:41 PM UTC

PB 2017 R3

What am I doing wrong here:



long ll_handle , ll
 integer i, li_count
integer li_ole_result

mailreturncode li_ret_mail

li_ret_mail = iole_mail.maillogon("Outlook","")

if li_ret_mail <>  mailreturnsuccess! then

    // never happens
    return -1
end  if

// create the mail
mailmessage lole_message
mailrecipient  lmail_recipient


//
lmail_recipient.address = is_mottaker   // have tried everything here
lmail_recipient.name = is_mottaker   // have tried everything here
lmail_recipient.recipienttype = mailto!

lole_message.recipient[1] = lmail_recipient
lole_message.subject = is_emne
lole_message.notetext = is_tekst

li_ret_mail = iole_mail.mailsend( lole_message )

if li_ret_mail <> mailreturnsuccess! then

     //never happens
    return -1
end  if


li_ret_mail = iole_mail.maillogoff()

 

 

I get mailreturnsuccess! throughout, but nothing arrives in destination mail. This is an attempt to replace an OLE instantiation of Outlook that actually performs. I have set simplemapi in PB.ini - tried both.

regards

sverre

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 15 August 2019 14:41 PM UTC
  2. PowerBuilder
  3. # 1

Hi Sverre;

  If the OLE approach works ... Why try & change it?

Regards... Chris

Comment
  1. Sverre Tvedt
  2. Friday, 16 August 2019 08:51 AM UTC
Good point as long as we rely on 32 bit Outlook on the client PC of a certain Windows subscription type. I was hoping this would allow us more freedom in this respect.
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 16 August 2019 04:17 AM UTC
  2. PowerBuilder
  3. # 2

I don;t see in your code where you actually create the MaisSessioin object.

Olan

Comment
  1. Sverre Tvedt
  2. Friday, 16 August 2019 08:51 AM UTC
It is an instance variable, instantiated in the constructor of the NVO. I have all variants, running only once before restarting PB IDE.
  1. Helpful
There are no comments made yet.
Sverre Tvedt Accepted Answer Pending Moderation
  1. Wednesday, 26 August 2020 12:09 PM UTC
  2. PowerBuilder
  3. # 3

Solved. It all depends on settings made to the Outlook account involved.

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.