Go Down

Topic: Sending E-mails, and calling NTP server (Read 10116 times) previous topic - next topic

Dan_ce

#15
Feb 20, 2012, 09:39 pm Last Edit: Feb 20, 2012, 09:43 pm by Dane Reason: 1
I identified the fault, but I have no idea WHY it's fault.

I went through the function line by line, commenting it out, until it uploaded fine. Paul, you would have clapped me on the back and had me over for dinner if you had seen it. ;)

The error is in this line, believe it or not

Code: [Select]
 client.println("Please let me know it worked!!!"); /* insert body */

I changed it to

Code: [Select]
 client.println("Let me know if it worked"); // insert body

and all is 90% well. An exclamation mark too far?

To be 100% well, the email would have to have had a subject and a from header. It sported neither on arrival.

PaulS

Code: [Select]
  client.println("Please let me know it worked!!!"); /* insert body */
You know what? It wasn't three / in a row that caused the problem. It was three !.
The art of getting good answers lies in asking good questions.

Dan_ce


Code: [Select]
  client.println("Please let me know it worked!!!"); /* insert body */
You know what? It wasn't three '/' in a row that caused the problem. It was three '!'


I figured it would be those guys...but why is three !!! in that context a problem? What does it tell the board?

Looking at the telnet SMTP spec, I don't think I'm going to be able to reproduce a proper email subject header, which is a PITA, because that's what I need to get the email to SMS gateway working. The gateway gets the 'to' phone number from the subject. Odd also that the from header doesn't work. The email looks like it's come from Mr Nobody!

SurferTim

Three exclamation points!!! Must have been important. I would have posted sooner, but I was running around, flapping my arms, and clucking like a chicken. I thought the sky must be falling!!! LOL  XD

OK, so much for the troll act.

The code in the link below is a bit more complete. I don't know if it is v1.0 compatible, but the send should be the same on both. You can see how you avoid the "Mr Nobody" thing.
http://arduino.cc/forum/index.php/topic,80137.msg606219.html#msg606219

PaulS

Quote
Three exclamation points!!! Must have been important. I would have posted sooner, but I was running around, flapping my arms, and clucking like a chicken. I thought the sky must be falling!!! LOL

You're killing me here.

Quote
I figured it would be those guys...but why is three !!! in that context a problem?

It does not matter where the three ! in a row are. Three in a row is a signal to the bootloader to do something.
Code: [Select]
  client.println("Please let me know it worked ! ! !")
would work fine.
The art of getting good answers lies in asking good questions.

Dan_ce


Three exclamation points!!! Must have been important. I would have posted sooner, but I was running around, flapping my arms, and clucking like a chicken. I thought the sky must be falling!!! LOL  XD

OK, so much for the troll act.


You guys are funny (really!) - but you do know it's not good ol' Dane who came up with the bright idea for the three exclamation marks, right?? :)

SurferTim

#21
Feb 20, 2012, 11:35 pm Last Edit: Feb 20, 2012, 11:54 pm by SurferTim Reason: 1
I know. It was that very naughty zoomkat! He has his faults, but at least he is housebroken.  :)

edit: Just kidding. He is normally quite good. Just an editing slip I'm sure.

zoomkat

#22
Feb 21, 2012, 03:09 am Last Edit: Feb 21, 2012, 03:14 am by zoomkat Reason: 1
Quote
edit: Just kidding. He is normally quite good. Just an editing slip I'm sure.


Guess I have a special compiler! Just used the code to send myself three emails and all arrived like below (without the address blanking). Seems my compiler doesn't really care about the three !!! in a row in the code.  :)

edit: The time seems strange. Below is what is in the full headers.

Date: Mon, 20 Feb 2012 20:53:07 -0500 (EST)


Quote

Date: Tue Feb 21 05:53:07 GMT 2012
From: <xxxxxx@yyyyyyyy.net> Add To Address Book
Subject: You Have Arduino Mail!!
To: xxxxxx@yyyyyyyy.net

Please let me know it worked!!!



Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

PaulS

Quote
Seems my compiler doesn't really care about the three !!! in a row in the code.

I seem to recall a patch to the bootloader to address the !!! issue. Perhaps the two of you are not using the same version of the OptiBoot bootloader. Or you, zoomkat, are not using the OptiBoot bootloader at all.
The art of getting good answers lies in asking good questions.

SurferTim

THREE EXCLAMATION MARKS IN A ROW?!!! Gotta go now. The sky is falling!!!
Bok bok bok bok bok bok BaGawk!  :smiley-eek:

I couldn't stop myself.  XD

Go Up