Rebuild email messages

  • Thread starter Thread starter kris b.
  • Start date Start date
K

kris b.

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.
 
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
 
Back
Top