there's a minor bug in MailMessage.cs in the method <private string GetMessageBody()>. when you attach the files you first add a "r\n" to the text. (wasn't there in version 1.09.02). I think it's supposed to read: "\r\n". BTW whats the timeout on the response of the server after mail is sent set to? I seem to have a problem because opensmtp doesn't wait long enough.
Greetings,
Eduard Ralph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've sorted out the timeout issue. If you have a big attachment (in this case 198 kb) and you comment out the Console.WriteLine() in <WriteToStream(ref NetworkStream nw, string line)> then the connection times out to quickly. I've put it up to 50000 milliseconds, but you might consider to put it up even higher. Alternatively you can make the Thread go to sleep for a while when the amount of data to transfer is high.
Geetings,
Eduard Ralph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was actually thinking of creating some asynchronous methods to call to help ease the load and timeout issues. I figure after this is done you can set the tcp timeout high, call the async send() and go about your business (IE your client can continue without having to wait). I will have to issue yet another release to fix the attachment error you show above, Ian S.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
there's a minor bug in MailMessage.cs in the method <private string GetMessageBody()>. when you attach the files you first add a "r\n" to the text. (wasn't there in version 1.09.02). I think it's supposed to read: "\r\n". BTW whats the timeout on the response of the server after mail is sent set to? I seem to have a problem because opensmtp doesn't wait long enough.
Greetings,
Eduard Ralph
Hi,
I've sorted out the timeout issue. If you have a big attachment (in this case 198 kb) and you comment out the Console.WriteLine() in <WriteToStream(ref NetworkStream nw, string line)> then the connection times out to quickly. I've put it up to 50000 milliseconds, but you might consider to put it up even higher. Alternatively you can make the Thread go to sleep for a while when the amount of data to transfer is high.
Geetings,
Eduard Ralph
I was actually thinking of creating some asynchronous methods to call to help ease the load and timeout issues. I figure after this is done you can set the tcp timeout high, call the async send() and go about your business (IE your client can continue without having to wait). I will have to issue yet another release to fix the attachment error you show above, Ian S.
Sorry about that, didn't mean to create more work for you :-)
Eduard Ralph