[Mono-list] Sending an email from within a program & if you're online

A.M. Abdelaziz amamh3 at gmail.com
Wed Feb 17 03:07:12 EST 2010


check for internet connection:

System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()
>
or:

> try {
> var ipentry = System.Net.Dns.GetHostEntry("www.google.com");
> } catch (System.Net.Sockets.SocketException e) { // probably no internet
> connection }
>





On Wed, Feb 17, 2010 at 9:22 AM, Paul <paul at all-the-johnsons.co.uk> wrote:

> Hi,
>
> As part of an application I'm writing, I have a need to send an email
> with some data back to me (it's a student CAL package for Chemists). I
> have no guarantee the OS, so can't use the likes of sendmail as it may
> be on a Win32 box (which is very likely).
>
> Is there anything within mono-2.6 (.NET 3.5 framework target) which can
> be called to send an email?
>
> Secondary to this, is there any platform independent method of checking
> if a machine is connected to a network or not? I did consider doing
> something like pinging the BBC website, but as this software is designed
> for students it is probable that the establishment will have disabled
> ping completely.
>
> TIA
>
> TTFN
>
> Paul
> --
> Sie können mich aufreizen und wirklich heiß machen!
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>


-- 
A.M. Abdelaziz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20100217/fd57b563/attachment-0001.html 


More information about the Mono-list mailing list