PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Rebuild email messages

Reply

Rebuild email messages

 
Thread Tools Rate Thread
Old 30-06-2003, 10:05 PM   #1
kris b.
Guest
 
Posts: n/a
Default Rebuild email messages


In Microsoft's KB Artical 'kbhowto KB223745' they talk
about creating a new email from scratch. There are other
ways to go about this, and this is a VBA solution, but
I've reworked it in .NET VB as a comm-addin and it works
fine.

So open a connection/recordset to your SQL Server with the
apporiate fields, To, From, Subject, Body etc and fill in
the fields of the new message:

MI.Subject = SQLrecordset.Fields("Subject")
MI.To = SQLrecordset.Fields("To")
' etc etc...
MI.Submitted = True
MI.Sent = True
MI.UnRead = True
MI.Update makePermanent:=True

The user should be able to send/reply to the message as it
will be a "real" email.

Hope it helps.

>-----Original Message-----
>Hi
>
>We are working on creating an Outlook addin to allow user

to export
>selected email messages to our SQL Server 2000 database

table. We
>will extract the To, From, Subject, Body, etc to

different table
>fields. However, is it possible that we can rebuild the

email
>messages based on what we have in the DB table? We want

to make it
>look like an existing outlook message as if the user

opens it from
>Outlook (such that the user can reply/reply all/forward

if s/he
>likes). We know that one way is to save the emails

as .msg files to
>the database, but this causes inconsistency in our

application because
>we have existing emails stored as plain text only and

some other
>emails are in RFC format.
>
>We have been searching for an answer for a few days

already and we
>have no luck so far. Any hints or suggestions are very

much
>appreciated.
>
>Thanks in advance,
>Jenny
>.
>

  Reply With Quote
Old 02-07-2003, 08:42 PM   #2
Jenny Tam
Guest
 
Posts: n/a
Default Re: Rebuild email messages

This definitely helps! I'd like to know whether I can set everything
like Sender, the Sender's email address, sent time, recipients, etc.
also?

The example from the KB article adds a new mail message to Inbox, what
if I don't want to do that? Can I create a dummy mail message to
display (and the user can reply/forward as if this was a real mail)
and somehow delete it afterwards?

Thanks
jenny


"kris b." <bunchkris@hotmail.com> wrote in message news:<2b1701c33f53$b8181f90$a401280a@phx.gbl>...
> In Microsoft's KB Artical 'kbhowto KB223745' they talk
> about creating a new email from scratch. There are other
> ways to go about this, and this is a VBA solution, but
> I've reworked it in .NET VB as a comm-addin and it works
> fine.
>
> So open a connection/recordset to your SQL Server with the
> apporiate fields, To, From, Subject, Body etc and fill in
> the fields of the new message:
>
> MI.Subject = SQLrecordset.Fields("Subject")
> MI.To = SQLrecordset.Fields("To")
> ' etc etc...
> MI.Submitted = True
> MI.Sent = True
> MI.UnRead = True
> MI.Update makePermanent:=True
>
> The user should be able to send/reply to the message as it
> will be a "real" email.
>
> Hope it helps.
>
> >-----Original Message-----
> >Hi
> >
> >We are working on creating an Outlook addin to allow user

> to export
> >selected email messages to our SQL Server 2000 database

> table. We
> >will extract the To, From, Subject, Body, etc to

> different table
> >fields. However, is it possible that we can rebuild the

> email
> >messages based on what we have in the DB table? We want

> to make it
> >look like an existing outlook message as if the user

> opens it from
> >Outlook (such that the user can reply/reply all/forward

> if s/he
> >likes). We know that one way is to save the emails

> as .msg files to
> >the database, but this causes inconsistency in our

> application because
> >we have existing emails stored as plain text only and

> some other
> >emails are in RFC format.
> >
> >We have been searching for an answer for a few days

> already and we
> >have no luck so far. Any hints or suggestions are very

> much
> >appreciated.
> >
> >Thanks in advance,
> >Jenny
> >.
> >

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off