Solved

receive email with attachment using powerbuilder

Posted on 2011-03-20
2
1,055 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now