Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: ConvertFromSystemNetMail working? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Stanz
Newbie
Newbie


Joined: 13 October 2009
Online Status: Offline
Posts: 3
Posted: 13 October 2009 at 3:58am | IP Logged Quote Stanz

Hi,

i am trying to convert a System.Net.Mail.MailMessage into a MailBee.Mime.MailMessage using the ConvertToSystemNetMail method, but all i get is an empty MailBee.Mime.MailMessage. I am using MailBee.Net objects 5.7 .

Here is one of my tests, which keeps failing.

[Test]
        public void ConvertToSystemNetMail_Subject() {
             MailBee.Mime.MailMessage mailbeeMailMessage = new MailBee.Mime.MailMessage();
             mailbeeMailMessage.Subject = "Testsubject";

             MailMessage mailMessage = mailbeeMailMessage.ConvertToSystemNetMail();

             Assert.AreEqual(mailbeeMailMessage.Subject, mailMessage.Subject);
        }

where is the problem?

Best regards
Back to Top View Stanz's Profile Search for other posts by Stanz
 
Stanz
Newbie
Newbie


Joined: 13 October 2009
Online Status: Offline
Posts: 3
Posted: 13 October 2009 at 4:01am | IP Logged Quote Stanz

whoops, was the wrong test (but this one in failing too) :)
Here is the right one:

[Test]
        public void ConvertFromSystemNetMail_From() {
             MailMessage mailMessage = new MailMessage();
             mailMessage.Subject = "Testsubject";

             MailBee.Mime.MailMessage mailbeeMailmessage = new MailBee.Mime.MailMessage();
             mailbeeMailmessage.ConvertFromSystemNetMail(mail Message);

             Assert.AreEqual(mailMessage.Subject, mailbeeMailmessage.Subject);
        }
Back to Top View Stanz's Profile Search for other posts by Stanz
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 13 October 2009 at 6:46am | IP Logged Quote Igor

We've just released an updated version of MailBee.NET.dll:

For .NET 1.1 and above
For .NET 2.0 and above

Please let us know if the update helps.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Stanz
Newbie
Newbie


Joined: 13 October 2009
Online Status: Offline
Posts: 3
Posted: 14 October 2009 at 12:42am | IP Logged Quote Stanz

Hi Igor, this updated version helped for the ConvertFromSystemNetMail method.

But my tests converting MailBee.Mime.MailMessage into System.Net.Mail are still failing.

        [Test]
        public void ConvertToSystemNetMail_From() {
             MailBee.Mime.MailMessage mailbeeMailMessage = new MailBee.Mime.MailMessage();
             mailbeeMailMessage.From = new EmailAddress("test@test.de");

             MailMessage mailMessage = mailbeeMailMessage.ConvertToSystemNetMail();

             Assert.AreEqual(mailbeeMailMessage.From.Email, mailMessage.From.Address);
        }

        [Test]
        public void ConvertToSystemNetMail_Subject() {
             MailBee.Mime.MailMessage mailbeeMailMessage = new MailBee.Mime.MailMessage();
             mailbeeMailMessage.Subject = "Testsubject";

             MailMessage mailMessage = mailbeeMailMessage.ConvertToSystemNetMail();

             Assert.AreEqual(mailbeeMailMessage.Subject, mailMessage.Subject);
        }
Back to Top View Stanz's Profile Search for other posts by Stanz
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 14 October 2009 at 6:51am | IP Logged Quote Igor

We've updated the DLLs once again, download links are the same.

Please let us know if this helps.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide