hanswolff / simple.mailserver Goto Github PK
View Code? Open in Web Editor NEWSimple SMTP Mail Server in C# 5 (using async features, discontinued!)
License: Other
Simple SMTP Mail Server in C# 5 (using async features, discontinued!)
License: Other
I have been looking for a way to stop the listening port without coming out of the console app
Is there something built in that I am missing or would I have to make a function to do this.
Hi,
I was playing around with your SMTP server project and in my stress testing I kept running into problems with the program trying to access an object that had been disposed.
I track this down to an issue in BaseConnection.cs the underlying problem being that Streams are not thread safe
I made a small change to lock the stream when writing to it and the problem went away, my change is below.
public async Task WriteLineAsyncAndFireEvents(string line)
{
if (Writer.BaseStream.CanWrite)
{
RawLineSent(this, new RawLineEventArgs(Writer.Encoding.GetBytes(line)));
// previously did:
// await Writer.WriteLineAsync(line);
// updated to this:
await TextWriter.Synchronized(Writer).WriteLineAsync(line);
}
}
I should note this problem only showed up when I threw thousands of connections at the SMTP Server
Receiving attachments using this mailserver is incredibly slow when attachments are large. Could you shed some light on this?
Hello.
After reciving 200 000 smtp messages the application occupy 150 000 Mb.
And memory usage is increasing.
There are some problems with memory leaks in the aplication.
Could you help me with it.
I thought of using this smtp server for sending sms, but it can't work on prodaction server with this issue.
Thank you.
The readme contains code from the 9.3 version.
It needs to be updated for the 9.4 version.
Blocks: #6
When will you release 0.9.4.0 to nuget.org?
Could you add an example in readme how to add filters for MailFrom and RecipientTo?
I noticed serious performance issue related to using Stream.ReadAsync method which has huge overhead in Simple.MailServer.Mime.StringReaderStream.ReadLineAsync method
for (var i = 0; i < _buffer.Length; i++)
{
var read = await BaseStream.ReadAsync(_singleBuf, 0, 1, cancellationToken); // <-- this is the issue
if (read <= 0)
I believe the following articles are related to the issue:
https://ayende.com/blog/173345/the-cost-of-async-i-o-false-assumptions-and-pride
https://nbsoftsolutions.com/blog/await-async-in-c-and-why-synchrony-is-here-to-stay
I was going to take a stab at implementing AUTH (probably LOGIN first) and wondered if @hanswolff had any suggestions for implementing the announcement and subsequent acceptance of credentials from the client.
I can extend SmtpCommandParser with a new ProcessCommandAuth, which handles the AUTH command along with the username, however this request then requires a subsequent send by the client of the password following a 334 (I think) response. This subsequent send does not contain a command parameter, only the password.
Here is a diff on a feature branch (sorry the commit is such a mess, it is just a spike and I inadvertantly included some superfluous code.
Any preference on how you would like this type of a workflow implemented?
How would I use this library to forward received emails.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.