daviddoria Posted August 5, 2009 Posted August 5, 2009 I often get calls from a friend of mine's company saying "ahhh our email is not working!". I thought I could write a program that would test a few things that they could run and have easy answers to my questions when they call. Things like "Is your internet connection alive?", "can you send mail but not receive it?", etc. Testing the outgoing mail seems easy: Try Dim EmailFrom As String = "test@from.com" Dim EmailTo As String = "test@to.com" Dim EmailSubject As String = "Test" 'compile report Dim EmailBody As String = "test" Dim email As New Net.Mail.MailMessage(EmailFrom, EmailTo, EmailSubject, EmailBody) Dim emailClient As New Net.Mail.SmtpClient("smtp.server.com", 587) emailClient.EnableSsl = True emailClient.Credentials = New Net.NetworkCredential("test@from.com", "passwd") emailClient.Send(email) Catch ex As Exception MessageBox.Show("uh oh, error!") End End Try MsgBox("Email sent.") But how would I test their incoming pop mail server? Is there a way to analyze the results of a telnet? This command: telnet mail.server.com 110 returns OK POP3 READY when the server is alive. Or is there a way to actually receive the test email that was just sent? Any thoughts on this? Also, any other comments on things that could be tested for network/mail "up" analysis are welcome! Thanks, Dave Quote
Administrators PlausiblyDamp Posted August 5, 2009 Administrators Posted August 5, 2009 I think I have an old but very basic pop3 class hanging around somewhere - will post that if I can find it. It isn't the most functional but should be enough to do what you need to do. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Administrators PlausiblyDamp Posted August 5, 2009 Administrators Posted August 5, 2009 The attached project includes a couple of pop3 related classes - covers the more common commands such as List, Dele, Retr etc. Might be enough to get you started.WindowsFormsApplication1.zip Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.