1. Jon Stoller
  2. PowerBuilder
  3. Sunday, 20 May 2018 18:13 PM UTC

QUESTION:
I created a report in PowerBuilder and I want the Power Script to send a copy if it as an email attachment. 
Can I automatically send an email through PowerBuilder?  Can I attach a file to the email? 
If so, how is it done?  Assume the filename and location is in "ls_folderfile".  The other required information is also shown below. 

Example:
String     ls_folderfile,   ls_email_addr,   ls_subject,   ls_email_text_message
integer    li_return

ls_folderfile = "c:\pdf\pbreport.pdf"
idw_rpt.Object.DataWindow.Export.PDF.Method = XSLFOP!
li_return = idw_rpt.SaveAs(ls_folderfile, PDF!, true)

ls_email_addr = "jon@akaware.com"
ls_subject = "Report from AKA Software"
ls_email_text_message = "The attachment is a report from AKA Software"

//What do I do next to send an email to the above email address, with the above subject and text message, with the above file attached (ls_folderfile). 

//Do you need the sender's email address?

 

 

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Tuesday, 22 May 2018 06:16 AM UTC
  2. PowerBuilder
  3. # Permalink

Hello Jon,

topic has been discussed already, you can follow any of these 2 options:

  • http://www.topwizprogramming.com/freecode_emailsmtp.html
  • https://support.appeon.com/index.php?/Knowledgebase/Article/View/128/0/sending-smtp-emails-from-powerbuilder-applications

​Best,

Marco

 

Comment
  1. Jon Stoller
  2. Monday, 28 May 2018 20:01 PM UTC
Thank you,

I will try it. 



Jon Stoller

  1. Helpful
There are no comments made yet.
Tom Jiang @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 22 May 2018 02:21 AM UTC
  2. PowerBuilder
  3. # 1

Maybe you can take a look at the ADO object: https://msdn.microsoft.com/en-us/library/ms527272(v=exchg.10).aspx 

Comment
  1. Jon Stoller
  2. Monday, 28 May 2018 20:02 PM UTC
Thank you,

I will try it. 



Jon Stoller

  1. Helpful
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.