Download emial attachment

robertz
robertz used Ask the Experts™
on
I want to save the eamil attachement into a file]
in the spcified folder and list all the mails
the mail attachement usually comes as wav files.
How to get this
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
What email platform are you using (Outlook, etc...)?

Commented:
Dim myOlapp As Application
Dim myFolder As MAPIFolder
Dim myNameSpace As NameSpace
Dim myItems As Items
Dim myAttach as Attachment
Dim PATH_YOU_WANT as String

PATH_YOU_WANT = "C:\Temp\"
Set myOlapp = CreateObject("Outlook.Application")
Set myNameSpace = myOlapp.GetNamespace("MAPI")
Set myFolder = myNameSpace.Folders("Inbox") 'change folder name if different

For Each myItem in myFolder.Items
 For Each myAttach in myItem.Attachments
     myAttach.SaveAsFile PATH_YOU_WANT & myAttach.DisplayName
 Next
Next

'then you can extract the attachments from the location you just saved...

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20368179.html

Author

Commented:
Yes ofcourse what you have said is correct
this works fine. But the problem is
we didn't have outlook in our system
So Is there any other way to configure directly
and get the attachment.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
We have a pop3 Exchange Server.
Which receives mails with attachements.
and stored them for approptiate users
So my program has to get the mails
from the pop3 server for a given user
and store the attachment files in a specified folder
of the local system.

Author

Commented:
I have got a program to retrieve pop3 mails
from server but i can't get the attachment.
I comes as some texts.I want to download the mp3
file.

Author of the Year 2009

Commented:
Hi robertz,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

robertz, Please DO NOT accept THIS comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial