Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Error using BeginSend Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Cleber
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 10 July 2006 at 9:59pm | IP Logged Quote Cleber

Hello,
I'd like to create a messageQueue with mailBee smtp.net, it's because we have a custom message for each customer. When use use BeginSend in a while/loop, in the next e-mail to send this error occurs:

Unhandled Exception: MailBee.MailBeeInvalidStateException: There is already an o
peration in progress

So, what's is the correct format. We need to use this because in each message, we have a Header-Info that after e-mail is sent I need to read and save an information in database.

Best Regards
Back to Top View Cleber's Profile Search for other posts by Cleber
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 11 July 2006 at 8:28am | IP Logged Quote Alex

Quote:

When use use BeginSend in a while/loop, in the next e-mail to send this error occurs:
Unhandled Exception:
MailBee.MailBeeInvalidStateException: There is already an operation in progress


BeginSend method can not be called again until the previous call is finished with EndSend method. The same approach should be used for all asynchronous methods in MailBee.NET.

Best regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Cleber
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 11 July 2006 at 10:18am | IP Logged Quote Cleber

Alex wrote:

BeginSend method can not be called again until the previous call is finished with EndSend method. The same approach should be used for all asynchronous methods in MailBee.NET.


Ok. If I call the EndSend method, it's cancel the send of message? I'd like to create a message Queue. It's BeginSend the best function to use to create a queue?

Best Regards
Cleber
Back to Top View Cleber's Profile Search for other posts by Cleber
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 11 July 2006 at 10:39am | IP Logged Quote Alex

Quote:

Ok. If I call the EndSend method, it's cancel the send of message?

EndSend method does not cancel message sending, it just ends the pending asynchronous request for sending the message to the recipients.

Quote:

I'd like to create a message Queue.

Yes, you can organize message queue with BeginSend and EndSend methods of MailBee.NET. Please note, each BeginSend method call should be accompanied by EndSend method call.

Best regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

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