Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Error with MailBee.Mime.HeaderCollection Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
olive.oliv
Newbie
Newbie
Avatar

Joined: 04 October 2007
Location: France
Online Status: Offline
Posts: 13
Posted: 04 October 2007 at 3:40am | IP Logged Quote olive.oliv

I've got an error with this code :

Dim h As MailBee.Mime.HeaderCollection
' h = nothing why ?
h.Add("Content-Description", "MYTEST", True)

mailer.Message.Attachments.Add(MyFilePath, Nothing, "", "Application/EDI", h, NewAttachmentOptions.None, MailTransferEncoding.Base64)

thanks
Back to Top View olive.oliv's Profile Search for other posts by olive.oliv
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 04 October 2007 at 8:29am | IP Logged Quote Alex

Quote:
Dim h As MailBee.Mime.HeaderCollection

This line declares a variable but it does not create an object. To create an object in VB, you should use:
Code:
Dim h As New MailBee.Mime.HeaderCollection


However, in MailBee.NET Objects v2, HeaderCollection object cannot be created. In v3 which will be released soon, this is now possible. You can get v3 dll at http://www.afterlogic.com/updates/mailbee_net3.zip

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
olive.oliv
Newbie
Newbie
Avatar

Joined: 04 October 2007
Location: France
Online Status: Offline
Posts: 13
Posted: 04 October 2007 at 1:29pm | IP Logged Quote olive.oliv

Well, I'have used the 3.0.0.66 version and there is still the same problem with
Dim h As New MailBee.Mime.HeaderCollection

the HeaderCollection object cannot be created

anny issue ?

thanks
Back to Top View olive.oliv's Profile Search for other posts by olive.oliv
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 05 October 2007 at 2:16am | IP Logged Quote Andrew

Perhaps, an old version of the dll is still used in your application for some reason. To make sure the latest version is used, add the the following code to your application:

http://www.afterlogic.com/mailbee_net/docs/MailBee.Mime.Mail Message.Version.html

Anyway, we prepared a simple VB.NET project which successfully creates and uses MailBee.Mime.HeaderCollection object. We've sent you the project via e-mail.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
olive.oliv
Newbie
Newbie
Avatar

Joined: 04 October 2007
Location: France
Online Status: Offline
Posts: 13
Posted: 05 October 2007 at 5:15am | IP Logged Quote olive.oliv

Sorry but i'm using the latest version : see the captured screen :
http://cjoint.com/data/kfopuZgQgX.htm

Hop this helps

olivier
Back to Top View olive.oliv's Profile Search for other posts by olive.oliv
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 05 October 2007 at 5:19am | IP Logged Quote Andrew

Does the project we provided you with work for you?

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
olive.oliv
Newbie
Newbie
Avatar

Joined: 04 October 2007
Location: France
Online Status: Offline
Posts: 13
Posted: 05 October 2007 at 10:01am | IP Logged Quote olive.oliv

no
see here :
http://cjoint.com/data/kftaNuQ4Ll.htm

I'm using
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

thanks
Back to Top View olive.oliv's Profile Search for other posts by olive.oliv
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 05 October 2007 at 10:28am | IP Logged Quote Alex

Enable logging mail session (you're using Pop3, Smtp, or Imap component in your app, right?) into a file, using Log property of any of these components and then try to connect to any mail server (the name can be fake, it's not important). Now, check what's in the log. There should a line "Assembly version x.x.x.x". What's there?

Probably, you're still using v2.0. For instance, this is possible if you manually replaced dll in the project folder and Visual Studio then replaced it with GAC version (which is still v2.0). See FAQ on how to update DLL reference in Visual Studio.

To remove the old version from GAC, open Windows\Assembly folder in Windows Explorer and delete MailBee.NET item.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
olive.oliv
Newbie
Newbie
Avatar

Joined: 04 October 2007
Location: France
Online Status: Offline
Posts: 13
Posted: 06 October 2007 at 1:32am | IP Logged Quote olive.oliv

I'm very sorry but I'm quit sure off me
here's the log file :
http://cjoint.com/data/kgkAwkFRBu.htm

here's some screen capture :
http://cjoint.com/data/kgkFMuXmZ7.htm

http://cjoint.com/data/kgkGtEgW7U.htm

thanks
Back to Top View olive.oliv's Profile Search for other posts by olive.oliv
 
olive.oliv
Newbie
Newbie
Avatar

Joined: 04 October 2007
Location: France
Online Status: Offline
Posts: 13
Posted: 06 October 2007 at 1:34am | IP Logged Quote olive.oliv

for the moment, I only use Smtp component.
Back to Top View olive.oliv's Profile Search for other posts by olive.oliv
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 07 October 2007 at 8:27am | IP Logged Quote Alex

Maybe you're using the latest version in your main project (because the log is quite long, I see this is not the test project your screenshots are from) while the test project still references the old version?

I double-checked that http://www.afterlogic.com/updates/mailbee_net3.zip actually contains HeaderCollection with a constructor.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
olive.oliv
Newbie
Newbie
Avatar

Joined: 04 October 2007
Location: France
Online Status: Offline
Posts: 13
Posted: 08 October 2007 at 3:32am | IP Logged Quote olive.oliv

Here's my screen capture :
this is your test project :
http://cjoint.com/data/kimGDx6Kia.htm

hope this helps
Back to Top View olive.oliv's Profile Search for other posts by olive.oliv
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 08 October 2007 at 4:43am | IP Logged Quote Andrew

To make sure the correct version is used, we increased version number of the dll (3.0.0.67 now), it's available here. Please try this version of the .dll and check the version number in the log file. Please let us know the outcome.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
olive.oliv
Newbie
Newbie
Avatar

Joined: 04 October 2007
Location: France
Online Status: Offline
Posts: 13
Posted: 08 October 2007 at 7:26am | IP Logged Quote olive.oliv

That's OK with the 3.0.0.67
but it's was bad with 3.0.0.66

however, the most important, is that every thing works well now.

thanks a lot.
Olivier
Back to Top View olive.oliv's Profile Search for other posts by olive.oliv
 

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