Solved

receive email with attachment using powerbuilder

Posted on 2011-03-20
2
1,073 Views
Last Modified: 2013-12-26
Hello,
Using PowerBuilder 9, what is the way to receive outlook email with attachment and save attachment file is specific folder.. with code please!.

thanks.

0
Comment
Question by:Deyhim
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
Deyhim earned 0 total points
ID: 35196334
Im using :

long n, c_row,ll_upper

mses = CREATE mailsession
if (mses.mailLogon ( 'profile', '', mailNewSession! )) = MailReturnSuccess! then
   mSes.mailGetMessages(true)
ll_upper= UpperBound(mSes.MessageID)

   FOR n = 1 to ll_upper
    mSes.mailReadMessage(mSes.MessageID[n], &
    msg[n], mailEntireMessage!,True)
 messagebox('here',msg[n].AttachmentFile[1].Pathname )

 
FileMove ( string(msg[n].AttachmentFile[1].Pathname), 'c:\' + string(msg[n].AttachmentFile[1].filename      ) )
 

NEXT
  mSes.MailLogoff()
END IF

DESTROY mSes



but the name of file is wrong by consider only first 6 character  





// Turn security warnings back on
If li_ret = 0 Then
        lole_osm.DisableSMAPIWarnings = False
        lole_osm.DisconnectObject()
Destroy lole_osm
End If


0
 
LVL 1

Author Comment

by:Deyhim
ID: 35196822
i found the problem but dont know what is the solution .. please help

problem is mailFileDescription filename length is always 12 as maximum value and pathname is 51 !!!

please help me..
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual Studio 2013 5 75
IronPython and Visual Studio 2013+ 2 98
How to format date and time in Eclipse IDE comments 2 66
How can I debug SSIS using Visual Studio 2008 2 74
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question