1. Sverre Tvedt
  2. PowerBuilder
  3. Thursday, 15 August 2019

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

Olan Knight Accepted Answer Pending Moderation
0
Votes
Undo

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

Olan

Comment
It is an instance variable, instantiated in the constructor of the NVO. I have all variants, running only once before restarting PB IDE.
  1. Sverre Tvedt
  2. Friday, 16 August 2019
There are no comments made yet.
  1. Friday, 16 August 2019
  2. PowerBuilder
  3. # 1
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Sverre;

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

Regards... Chris

Comment
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. Sverre Tvedt
  2. Friday, 16 August 2019
There are no comments made yet.
  1. Thursday, 15 August 2019
  2. PowerBuilder
  3. # 2
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.