Send PDF Attachment using IBM Lotus notes email with PowerBuilder classic 12.5

Try to automate send PDF attachment ( datawindow  save as PDF file in a specific folder directory path, then from powerbuilder automatic send this attachment to email address. )
The following code allow me to open the lotus notes email with the right email address, subject and message note;   however it didn't get the PDF file attachment even I hard code the
file name and file path.   Any suggestion how to handle this.  I already look at your answear, but it is not work for my case.


mailSession mSes
//mailrecipient  mrecipient
mailReturnCode mRet
mailMessage mMsg
mailFileDescription   mAttach

// Create a mail session
 mSes = create mailSession
 // Log on to the session
 mRet = mSes.mailLogon(mailNewSession!)
 IF mRet <> mailReturnSuccess! THEN
  MessageBox("Mail", 'Logon failed.')
     RETURN -1
 // set up for attachment
 mMsg.Subject = 'Test'    // str_email.subject
 mMsg.NoteText = 'Test PDF attachment send '   // str_email.message
 mMsg.Recipient[1].name = ''   // str_email.address
 mAttach.FileType =mailAttach!  
 mAttach.Filename =  'Q#12345v10'
 mAttach.Pathname = 'c:\dev\' +  'Q#12345v10'
 mAttach.Position    = len (str_email.message) - 1
    mMsg.AttachmentFile[1] =  mAttach
 mRet = mSes.mailSend(mMsg)
 IF mRet <> mailReturnSuccess! THEN
   MessageBox("Mail Send", 'Mail not sent')
   RETURN -1
Who is Participating?
Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
"This article tries to give a basic idea on how to send mails through Lotus Notes using Power Builder."
MywoodyAuthor Commented:
Thank you very much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.