Author |
|
raindm Groupie
Joined: 31 January 2008 Location: Israel
Online Status: Offline Posts: 44
|
Posted: 19 July 2009 at 5:42am | IP Logged
|
|
|
Hello
Sometimes i get the following error:
"Operation is not valid due to the current state of the object." I catch it when executing the code (sending email)
objMailer.Send(m_strBounceMail, (string)null);
This usually happens sometimes for hotmail.com and rarely for yahoo.com, sometimes resending solves the problems.
If you have any ideas what could cause the this error i would really aprehiate it..
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 July 2009 at 2:06am | IP Logged
|
|
|
To let us help you on this, please enable logging SMTP session into a file, reproduce the issue and provide us with the log file for examination.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
raindm Groupie
Joined: 31 January 2008 Location: Israel
Online Status: Offline Posts: 44
|
Posted: 23 July 2009 at 6:19am | IP Logged
|
|
|
Good idea, just when i enable logging and since i am using my own threads to send i get the error sometimes:
Error: IOException occurred. InnerException message follows: The process cannot access the file 'c:\Log\SmtpLog.txt' because it is being used by another process.
How do i make it work if i use my own threads?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 23 July 2009 at 6:36am | IP Logged
|
|
|
Quote:
This usually happens sometimes for hotmail.com and rarely for yahoo.com, sometimes resending solves the problems. |
|
|
Please check that multiple threads aren't using the same instanse of Smtp object; each thread should have it's own instance.
Quote:
How do i make it work if i use my own threads? |
|
|
We suggest using this property for synchronization.
Quote:
Error: IOException occurred. InnerException message follows: The process cannot access the file 'c:\Log\SmtpLog.txt' because it is being used by another process. |
|
|
Which method throws such exception? Perhaps, you can get the stack trace?
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|