using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.NetworkInformation;
namespace Common {
public static class MailHelper {
public static bool InternetConnectionAvailable( ) {
bool result = false;
Ping ping = new Ping( );
PingReply reply = null;
try {
reply = ping.Send( "www.google.com" );
result = reply.Status == IPStatus.Success;
} catch ( Exception ) {
}
return result;
}
}
}