Hi,
I want to use the arduino GSM shield (Code: A000043) to send email with a data file as an attachment. Is there any example code available to achieve this.
I have arduino version 1.0 - will the GSM library work with this?
Cheers.
Hi,
I want to use the arduino GSM shield (Code: A000043) to send email with a data file as an attachment. Is there any example code available to achieve this.
I have arduino version 1.0 - will the GSM library work with this?
Cheers.
I'm not aware of any libraries that do it directly, but in principal it should be a matter of communicating with an SMTP server and sending the email. You might want to look at SMTP Client - CodeProject although I think this probably uses Berkley sockets, and is also probably asynchronous, so may not be much help.
SMTP servers are not that complex, but much more complex than simple HTTP requests, and making something robust that will fit on an Arduino may prove to be a challenge. I would recommend getting yourself a free web host (there are loads of these around that will be more than adequate for your needs). You could then send your files via http requests (lots of examples around for this sort of thing) and then have the web server email the request on (it'll probably be a php based server, so this could be as little as 3/4 lines of code).
It may seem like a bit of an odd way to do it, but it'll probably be the much faster, and probably more reliable method.