Data logging transfered Via E-mail

Hello, I have successfully created a mini data logger but my main issue to further this project would be to transfer it through e-mail. Is there a way for me do to so without using a 3rd party program like Temboo?

I'm not expecting a complexe detailed answer a short quick, yes, with a small description or no with why not would be great. Maybe a mentioning of a few hardware components required to do so as well.

Thank you!

Impossible to answer, given zero information about your “mini data logger”.

I'm using an arduino Mega, with an ethernet shield. Using temboo i was able to send temperature values read by my tmp36 temperature sensors in which used also a RTC to save time stamps. Every hour i store a temperature to then save it for all 24 hours of the day and e-mail the information gather with the time at which it was sensed.

I can't think of any other details you would need for a solid answer feel free to ask me any questions to clarify my project up to your eyes. As I will answer with the best I can.

I'm not expecting a complexe detailed answer

I'm sure the answer is yes.

Some guru like Surfer or Zoomkat will come along and explain all about webservers etc., but I suspect the simplest way is to use a GSM shield and send the stuff as a text. I guess it could also send emails via a data-only service.

I didn't realise Temboo was good for this sort of stuff but, if you have that going, i don't see what email has to offer. With cosm, you could download the day's data if you needed it.

I only use the RTC to timestamp a backup file to on-board SD. Local terminal and cosm do their own timestamping.

The OP has an ethernet shield. Google "arduino send email" for several tutorials, like this one on the Arduino Playground: http://playground.arduino.cc/Code/Email

Is there a certain service you would suggest, I’ve been reading that certain e-mail services won’t allow odd e-mails send like this to avoid bots spamming e-mails. Basically I’m trying right now gmail sending to Outlook. I doubt this is a good idea which could be maybe the reason my e-mail through the code claims it fails to send. I’m sure it can be other things too, but this seems to be my first issue.

I’m not knowledgeable enough to know what could be the cause of any other issues. I am in fact using the code provided here

I successfully changed my emails, the sender smtp to Stmp.gmail.com (whether this is valid or not). I only changed the Ip sending if that actually has an effect on the email. I might just have issues connecting to the ethernet shield itself, i’ve never tried it manually I’m used to DHCP connections.

On a side note I was wondering if anyone knew anything about this stuff would be better running with an Arduino Yun. I’ve read up on it and some projects with it and it seems interesting. Just curious to see if anyone has any insight on it.

Once again any tips or help is appreciated.

Where do you want to send the data? If it is within a home network, there are many other possibilities than email.

My project is to be able to send e-mail because of my data logger will be in a remote location. If this isn't feasible it might require me to stick with the temboo choreos, but I would truly like to find a way around temboo and be able to send my own E-mail!

Hi Tluck,

The 'guru' Surfer Tim has been around and left a very helpful piece of code that does just what you are looking for:

http://playground.arduino.cc/Code/Email

You'll have to adapt some things to your needs, but the fundament from Tim is solid...

Plse make sure to use a smtp server that requires no authentication (mostly the server of your provider will not when you're on their network with the Arduino)

You can now use basic auth with some email servers. I have an account with SMTP2GO, and the second email sketch works fine with it. It is about halfway down this page.
http://playground.arduino.cc/Code/Email
Gmail is right out. It requires either TLS or SSL, which neither is supported by the Arduino library.

edit: Here is the code to send an attachment. You will need to open and send the SD file where the comment "This is where you would send your file" is.

// remove \r\n from this line
  client.println("Subject: Arduino email test");

// this is new 
  client.write("MIME-Version: 1.0\r\n");
  client.write("Content-Type: Multipart/mixed; boundary=frontier\r\n\r\n");
 
  client.write("--frontier\r\n");
  client.write("Content-Type: text/plain\r\n\r\n");
 
  client.write("This is from my Arduino!\r\n");

  client.write("--frontier\r\n");
  client.write("Content-Type: text/plain\r\n");
  client.write("Content-Disposition: attachment; filename=test.txt\r\n\r\n");

// this is where you would send your file
  client.write("This is a test\r\n"); 

  client.write("--frontier--\r\n");

// end of new

  client.println(".");
  if(!eRcv()) return 0;

Hello, I have successfully created a mini data logger but my main issue to further this project would be to transfer it through e-mail. Is there a way for me do to so without using a 3rd party program like Temboo?

I'm new to this technology as well and have been looking into Temboo, Do you mind if I ask why you want to go around Temboo?

I am On the SMTP2GO signup page and notice you have to include your email address and password to sign up. I take it that SMTP2GO isn't an email account itself? What is the difference in SMTP2GO and Temboo?

Gmail is right out. It requires either TLS or SSL, which neither is supported by the Arduino library.

Are you saying Gmail will not work with SMTP2GO? Will yahoo mail work? If not, what is recommended that is free and has credible security? Sony's email service is out of the question.

I would like to email my phone number. verizon you can do this using the email address yourpersonalphonenumber@vtext.com Can I set it up so the message is sent to that email address?

Is it possible to respond to emails so that the arduino is controlled by the response?

I am On the SMTP2GO signup page and notice you have to include your email address and password to sign up. I take it that SMTP2GO isn't an email account itself?

No. It is only an email sender. It requires an email account to register. It sends an email to that email address with a link to activate your "account". Your email address is your user name.

I would like to email my phone number. verizon you can do this using the email address yourpersonalphonenumber@vtext.com Can I set it up so the message is sent to that email address?

Yes. I just tested it, and it works fine.

Thanks SuferTim! You are awesome!

If someone will answer these three questions i'll sign off of this thread and get to work on modifying this to work with my project.

What is the difference in SMTP2GO and Temboo?

Are you saying Gmail will not work with SMTP2GO? Will yahoo mail work? If not, what is recommended that is free and has credible security?

Is it possible to respond to emails so that the arduino is controlled by the response?

You can send to any email address, including Gmail and Hotmail, from your SMTP2GO account.

You will probably not be able to respond to the text message or email unless the email account you used as your username can accept them. I haven't tested that though.

You will probably not be able to respond to the text message or email unless the email account you used as your username can accept them. I haven’t tested that though.

This is one of the reasons I asked

What is the difference in SMTP2GO and Temboo?

Can Temboo respond to the text message so that the response controls the arduino? Are there any any differences to be aware of?

I think the sole reason people buy sim card shields is so they can control the arduino from their phone.
A lot of people like me consider this technology, but decide not to pursue it because in order to use the sim card shield you (must pay for a separate phone line in order to use this technology, or contract a pay as you go plan which cost about 10 cent per message) If we could find a free alternative, that uses the wifi it would benefit a lot of people. I’ve seen a lot of people interested in controlling the arduino from their phone. Most of them ask about Sim card shields, because they can’t think of an alternative, or don’t word the way they ask to address this.

Does anyone know of an email account that can accept a response that controls the arduino?

SuferTim,

Out of curiosity, why did you start using the SMTP2GO instead of the first example code that you posted on December 2012 on http://playground.arduino.cc/Code/Email ?

Is this because

Many email servers will not accept email from a non-commercial, dhcp-issued ip address. If that is the case, the server will send an error with a statement to that fact in the error message.

and SMTP2G) bypasses this?

I’m a little confused about

Your user name and password must be base64 encoded with utf-8 character set

I do not know what these means and where I make those changes and/or find this information.

Not all email servers accept email directly from an Arduino with the first example.

SMTP2GO allows any Arduino to send email to any account.

I don't know about controlling the Arduino with text message, but maybe email.

I'm a little confused about

Your user name and password must be base64 encoded with utf-8 character set

I do not know what these means and where I make those changes and/or find this information. Do I need to encode the name of my email account?

I don't know about controlling the Arduino with text message, but maybe email.

If it can be controlled by email, and you can send a text message to your email (for example, when you tested sending a text message from your email account in the post at 1:51pm) then if you were to respond to that text, it would send the response text message to the email account that sent it, then wouldn't that text show up on the email account in email format as well? I don't understand the difference.

Google "base64 encoding".

Google "base64 encoding".

Base64 - Wikipedia I guess I should have been more specific if I wanted a more specific answer.

I am using the code Tim Referenced previously.
I think this is the part that is not base64 compliant. I think the period is the problem, but if I take that out, how will it know where to send it? The other possible problem is that the client.print is only 30 characters. I do not know what to use for the other 34 characters though.

Serial.println(F("Sending User"));
// Change to your base64 encoded user
client.println("firstname.lastname@gmail.com");

If anything in here makes my email or computer vulnerable let me know what it is and I will edit that part out. Here is the serial readout. It says 501 Invalid base64 data

Starting connection to server...
connected to server
Ready. Press 'e' to send.
connected
220 smtpcorp.com ESMTP Exim 4.85 Mon, 18 May 2015 15:40:44 +0000
Sending hello
250-smtpcorp.com Hello 1.2.3.4 [71.53.110.37]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH CRAM-MD5 PLAIN LOGIN
250-STARTTLS
250 HELP
Sending auth login
334 VXNlcm5hbWU6
Sending User
501 Invalid base64 data
221 smtpcorp.com closing connection
disconnected
Email failed