Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Email Client

Posted on 1998-12-22
3
Medium Priority
?
243 Views
Last Modified: 2010-04-04
I am writing an Email client.  I am using the Delphi 4 Pop3, Smtp components.  I am able to get and send mail from the
server ok.  I would like to save the Emails / attachments
in a file of some sort, but have no knowledge of how to do this correctly.  I could really use a good example of the
write way to write mail to a file & be able to retreive
it again placing it into the correct folder, ie (inbox,
or other folders.. like outlook).

Any Suggestions would be Greatly Appreciated.
0
Comment
Question by:dlbowman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
dwwang earned 600 total points
ID: 1352620
Well, actually the processing of attachment is quite easy:

For sending attachments, you only need to provide the filenames, here is an example:
NMSMTP1.PostMessage.Attachments.AddStrings(AttachmentsField.Lines);
where AttachmentsField could be a memo, listing all file names selected by the user of you software.

For receiving attachments, you need simply indicate the directory that the pop3 component should save the attachments to, below is an example:
NMPOP31.AttachFilePath := '.'; this will save the attachments to current directory.

Regards,
Wang
0
 

Author Comment

by:dlbowman
ID: 1352621
Actually I am currently saving the Attachments locally.  I was interested in saving the
Email message to a local file, just the Outlook & Netscape do.  I would like to know
the best way to save Emails to a file & be able to extract them from the file when the
Email Client program is loaded.  Basically I would like to have the same functionality
as Outlook and Netscapes Email Clients.  Sorry if I posed the question wrong.

Thanks

Doug
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1352622
Oops, sorry for misunderstanding your question.

I think it's a complex task, although may not be so difficult. You need to build database yourself to store most of the information of the mails. You know Outlok and Netscape mail all have their own non-standard databases for storage. However, you can use normal databases, such as paradox.

Here is an outline:

1. a mail message table, saveing all informations a that can describe a mail, you can refer to the TMailMessage structure in Delphi,
      MessageID, head, from,body,etc...

2. an Attachment table, with an ID field to refer to the mail message table,(hopefully you can use the MessageID in previous table). Then an attchament field, which should be a BLOB field, so that you can save the attachment using methods such as LoadFromStream, for whatever kind of file.

Teh relationship of the two tables is 1-n, since there can be multiple attachments per mail.

Hope this helps.
Regards,
Wang

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

722 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