Solved

receive email with attachment using powerbuilder

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

929 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

13 Experts available now in Live!

Get 1:1 Help Now