Solved

receive email with attachment using powerbuilder

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 and create keystrokes 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.

829 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