New support for SMTP dialog extraction and analysis and advanced proxy binding
Published on Tuesday, July 5, 2011
Another great release of our popular email validation component for Microsoft .NET is out!
EmailVerify.NET version 4.4, released a couple of days ago, adds a totally-new support for extracting and analyzing in an object-oriented fashion the SMTP dialog, when available, using a new hierarchy of objects added to the Cobisi.EmailVerify.Smtp namespace.
How can you use this feature? Using the new SmtpDialog property of the VerificationResult, in a very simple and intuitive way.
Here is a short example:
Part of this new release, we also added a new ProxyBinding event, that can be used to bind the component to a specific proxy server for each connection it makes. Wow! A great addition for who validates email addresses behind a proxy server, being it a SOCKS 4, SOCKS 5 or HTTP Connect proxy!
As always, please see the release notes of our component for a comprehensive list of what's new.
Cheers!
--
Efran Cobisi
EmailVerify.NET lead developer
EmailVerify.NET version 4.4, released a couple of days ago, adds a totally-new support for extracting and analyzing in an object-oriented fashion the SMTP dialog, when available, using a new hierarchy of objects added to the Cobisi.EmailVerify.Smtp namespace.
How can you use this feature? Using the new SmtpDialog property of the VerificationResult, in a very simple and intuitive way.
Here is a short example:
var verifier = new EmailVerifier();
// TODO: Configure the component...
var result = verifier.Verify("john@example.com", VerificationLevel.CatchAll);
// Output the whole SMTP dialog to the console window
if (result.SmtpDialog != null)
{
// The ToString() method extracts the raw SMTP dialog
Console.WriteLine(result.SmtpDialog.ToString());
}
// Output specific details of the SMTP replies
foreach (var smtpMessage in result.SmtpDialog.Messages)
{
if (smtpMessage is SmtpCommand)
{
var smtpCommand = (SmtpCommand)smtpMessage;
// Outputs the raw SMTP command line
Console.WriteLine(smtpCommand.RawLine);
}
else if (smtpMessage is SmtpReply)
{
var smtpReply = (SmtpReply)smtpMessage;
// Iterates over the lines of the SMTP reply
foreach (var replyLine in smtpReply.ReplyLines)
{
// Outputs some information of the SMTP reply received from the mail exchanger
Console.WriteLine("SMTP Code: {0}\nMessage: {1}",
replyLine.Code,
replyLine.Message);
}
}
}
Part of this new release, we also added a new ProxyBinding event, that can be used to bind the component to a specific proxy server for each connection it makes. Wow! A great addition for who validates email addresses behind a proxy server, being it a SOCKS 4, SOCKS 5 or HTTP Connect proxy!
As always, please see the release notes of our component for a comprehensive list of what's new.
Cheers!
--
Efran Cobisi
EmailVerify.NET lead developer