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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sjef BosmanGroupware ConsultantCommented:
"This article tries to give a basic idea on how to send mails through Lotus Notes using Power Builder."

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MywoodyAuthor Commented:
Thank you very much
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.