Send email with Ethernet module...possible?

Is it possible to send email using the ethernet module? I’m not seeing an obvious API for it.

I’ve got the Ethernet module hooked up, and it seems to be getting an IP address OK (though I don’t seem to be getting NetworkUp/NetworkDown events firing, oddly enough), and I’ve checked out @ Architect’s RSS sample code as well.

Has anyone tried this? Just don’t want to waste my time going down a road that won’t work. I can always pop some server-side code up to handle a request if need be.

The basic scenario I’m trying to enable is to generate an image on the Spider board and email it to an email address specified by the user (BTW - the Glide library for UI stuff is awesome…love that it has a touch keyboard built into it…great stuff!).



Probably you can make use of older .NET Micro Framework code. Have you visited or

[url]GHI Electronics – Where Hardware Meets Software

Of course, you can take the code as a reference. it is not a plug and play thing with .NET Gadgeteer.
Probably it is a great idea if you modify the code for .NET Gadgeteer and contribute it to the community. I am sure other members will like it.

Thanks, Joe!

I did some poking around on the code site, but hadn’t found any email stuff. I’ll take a look at that project, and if I get some code working for Gadgeteer, I’ll be happy to share it back with the community.



SMTP email is fundamentally only strings of a certain format sent on port 25. The one thing that the example on the wiki somewhat glosses over is authentication; these days many servers require you to authenticate with a valid username/password combo in the SMTP stream. Good old telnet can let you test your own domain’s SMTP server, see [url]Microsoft Learn: Build skills that open doors in your career

This is explained in the Internet of things ebook found under this link:

@ devhammer

Ok, now I’m interested in knowing what you will be demoing :slight_smile:



That will all depend on what I can successfully develop between now and next Saturday. ;D

I was having difficulty with the networking while at the office, likely due to proxy issues, but now that I’m home, the sample RSS app is working great, so I can start playing with some TCP code to see if I can get basic SMTP functionality working.

I also found my eblock kit waiting for me when I got home, so I’ll have to find a use for that, too.


I know a fair amount about the underlying workings of SMTP, and have used telnet to test SMTP functionality in the past. What I was looking for was whether there was any higher-level APIs built into either Gadgeteer or the ethernet module that would make it easier.

Sounds like the answer to that is no, so I’ll get cracking on coding up something myself.

Thanks for the replies!


Perhaps I’m missing something, but it looks like the solution in the Internet of Things ebook relies on classes designed to work with the W5100 Ethernet TCP/IP chip. For example, the Dns class states:

“IMPORTANT: Use this class only with WIZnet W5100 Ethernet TCP/IP Chip.”

Are these classes also compatible with the Ethernet J11D Module?

In my testing, the call to Dns.GetHostEntry fails saying “DNS server IP address was not found.”

I can keep digging into this, but I want to make sure I’m not wasting my time with classes that are incompatible.

“.NET” is the keyword here. Any example you see on the web for .NET C# will work as-is or with minor changes.

Yes FEZ Panda relies on Wiznet w5100 but that is not the case of large devices like FEZ Spider. But, the interface is still the same, which is .NET sockets.

Do not include any w5100 DLLs in your build and use sockets as if you were using them on a PC.

Heh. That assumes that I’m used to sockets programming on a PC. Which turns out to be an erroneous assumption.

Still, I’ll figure it out eventually. :slight_smile:

In the meantime, I got my eblock expansion module working. Amazing the pleasure that comes from successfully blinking a single LED…

Got it working…resolved the namespace issues by substituting the System.Net and System.Net.Sockets namespaces for the W5100 ones in the example code.

The rest was a matter of getting the syntax right, once I remembered that Verizon blocks port 25 outbound, so I needed to use port 587 instead.

I tripped myself up a couple more times with missing CRLFs, but I’ve managed to send an email once, so I’m sure I can do it again.

Once I’ve had a chance to make sure the code works consistently, and clean it up a bit, I’ll be happy to share it.

Hi devhammer,
time to hammer that code onto the WIKI, budy :wink:

thank you.

Will do, but wanted to get the whole solution working first…as you’ve seen on the other thread, still struggling with some aspects. :slight_smile:

@ Jay

FYI, I’ve added the SMTP code to TinyCLR Code:


It’s based on the FEZ email-based door monitor code found here:

[url]GHI Electronics – Where Hardware Meets Software

the two big differences are that I updated the code to be compatible with the FEZ Spider ethernet module, and also added support for SMTP authentication.

Thank you for sharing, the class looks great, i will try it and let you know.

LOL but i was hoping you would have tackled the SSL Authentication stuff. but it doesn’t look like you did…

basically what i’m trying to do, is make this work with GMAIL server and accounts which require the use of SSL…
i know that the Spider has SSL support but could find much doc on the subject, but i know i didn’t dig deep enough…

Gus any pointers?

thank you.