Dopo alcune prove ed errori, sono riuscito ad avere successo con il seguente accordo. 
Il mio codice è simile a https://github.com/jstedfast/MailKit#sending-messages:
public void DoMail()
{
var message = new MimeMessage();
message.From.Add(new MailboxAddress("Joey", "[email protected]"));
message.To.Add(new MailboxAddress("Alice", "[email protected]"));
message.Subject = "How you doin?";
message.Body = new TextPart("plain")
{
Text = @"Hey Alice,
What are you up to this weekend? Monica is throwing one of her parties on
Saturday and I was hoping you could make it.
Will you be my +1?
-- Joey
"
};
using (var client = new SmtpClient())
{
// For demo-purposes, accept all SSL certificates (in case the server supports STARTTLS)
client.ServerCertificateValidationCallback = (s, c, h, e) => true;
client.Connect("localhost", 25, false);
// Note: since we don't have an OAuth2 token, disable
// the XOAUTH2 authentication mechanism.
client.AuthenticationMechanisms.Remove("XOAUTH2");
// Note: only needed if the SMTP server requires authentication
//client.Authenticate("joey", "password");
client.Send(message);
client.Disconnect(true);
}
}
Per coloro che non possono accedere a Imgur:
Domain Name: localhost
Ascolta Interfaccia: 0.0.0.0
Numero porta: 25 (anche se, nel caso di Dalsier, Dalsier userebbe 26)
Estensioni:
- [] implicito SSL/TLS
- [x] 8BITMIME
- [] STARTTLS
- [] AUTH
- [x] Misura
SSL/TLS certificato: Nessuno
Password certificato SSL/TLS: Nessuna
Dimensione messaggio massima (byte): 0
Ricevi Timeout (ms): 30000
Opzioni:
- [] richiesta autenticazione
- [] Richiede connessione sicura
- [] consentire solo l'autenticazione del testo chiaro su connessioni protette
Yes I fare. Il problema principale è che smtp4dev sta ascoltando la porta 26 e quando il codice client esegue gli stop smtp4dev. Sembra che un'eccezione sia stata lanciata all'interno del codice smpt4dev. – Dalsier