Author |
|
cusimar9 Newbie
Joined: 23 February 2009
Online Status: Offline Posts: 5
|
Posted: 23 February 2009 at 1:14am | IP Logged
|
|
|
Hi,
I've downloaded the MailBee trial to see if I can do what I need.
Its very simple - I just need to be able to send an email as normal, but then connect to the IMAP address and add a copy of the email to the 'sent' directory.
I've followed this example, but the Server.CreateObject("MailBee.IMAP4") call fails.
I've installed the MailBee components.
In the samples directory I've seen the MailBee objects are used by simply importing the MailBee namespaces and calling:
imp = New Imap
However I see no method here called 'AppendMessage'
Have I missed something? How can I achieve this in ASP.NET VB?
|
Back to Top |
|
|
cusimar9 Newbie
Joined: 23 February 2009
Online Status: Offline Posts: 5
|
Posted: 23 February 2009 at 1:15am | IP Logged
|
|
|
Just to clarify, I'm using Visual Studio 2008 and developing a web app for .NET 3.5
|
Back to Top |
|
|
cusimar9 Newbie
Joined: 23 February 2009
Online Status: Offline Posts: 5
|
Posted: 23 February 2009 at 6:56am | IP Logged
|
|
|
Never mind, I've figured it out. Here's a codesample if anyone needs it:
' Set the IMAP MailBee License
Imap.LicenseKey = "xxxxxxxxxxxxxxxxxxxxxxx"
Dim imp = New Imap
' Connect to server. imp.Connect ("mail.yourserver.com")
imp.Login("email@yourserver.com", "password")
Dim MailBeeEmail As New MailBee.Mime.MailMessage
MailBeeEmail.To.Ad d("toaddress@gmail.com")
MailBeeEmail.From = New MailBee.Mime.EmailAddress("email@yourserver.com")
MailBeeEmail.Subject = "test subject"
MailBeeEmail.BodyPlainText = "this is a test"
imp.UploadMessage(MailBeeEmail, "Sent")
imp.Disconnect()
|
Back to Top |
|
|