How to set SMTP settings in print preview window

Hello everyone,

we have an application that was developed using “PowerBuilder 2017 R3 Build 1858” which is using “List & Label 24.005” for some of our printouts.

Everything is working fine, except we are not able to configure the “Send To E-Mail” functionality. In our application the user can define and store his/her e-mail settings and is also able to send an e-mail from within the application. But whenever the user clicks on the “Send To” button within the print preview window, an empty e-mail with only the attached document file pops up using the local default e-mail program (Outlook in my case).

We would like :

  • to be able to pass the available e-mail settings within our PowerBuilder application onto the print preview (especially the SMTP settings)
  • the print preview window NOT to use the locally default e-mail program, but use the given settings
  • when the user clicks on the “Send To” button either an e-mail with a given subject, body, to, and from address comes up or an e-mail is sent automatically using the predefined values.

I already tried setting “Export.Mail. …” settings via “LlXSetParameter” function and setting a valid configuration within the e-mail configuration dialog “LsMailConfigurationDialog()” but to no avail.

Any help will be much appreciated!

Best regards,
Constantin Bergtt

I have tried both and it works in both cases, could you describe exactly what you have already tried and what does not work exactly?
Thank you.

Hi @ealacali,

thanks a lot for the quick reply!

So the first thing I tried was to set the following settings via LlXSetParameters :

  • Export.Mail.Provider = “SMTP”
  • Export.Mail.To
  • Export.Mail.From
  • Export.Mail.ReplyTo
  • Export.Mail.Subject
  • Export.Mail.Body
  • Export.Mail.SMTP.ServerAddress
  • Export.Mail.SMTP.ServerPort
  • Export.Mail.SMTP.ServerUser
  • Export.Mail.SMTP.ServerPassword
  • Export.Mail.SMTP.SenderAddress
  • Export.Mail.SMTP.SenderName

But when opening the print preview window and clicking on the “Send To …” button, still a small window “Mail Configuration” comes up and when clicking “OK” an empty e-mail window is shown.

The same goes when opening the “Mail Configuration Dialog” before opening the printout by calling :


from powerbuilder and setting valid e-mail settings, which allow a successful sending of a test e-mail.

But the result is still the same, an empty e-mail window.


Hi @ealacali,

any news on this topic?

Do you require some more information or was my previous answer sufficient?

Best regards,
Constantin Bergatt

I would please you to test the ExportOption ->Export.Mail.ShowDialog, what happen when you set this Option too.
The empy-e-mail window is from outlook it seems that your application/List & Label think you have set “XMAPI” as provider.

I think for a further analysis of this behavior it will be better that you open a support case, there we have more options in terms of data exchange.

Thank you.

Hi @ealacali,

sorry for the late reply!

I was on vacation and only got back to office today.

So per your suggestion I created a support ticket “W202003170002” for this issue.

Hopefully they can help us with our problem!

Thanks a lot for all your efforts!

Constantin Bergatt

1 Like