Arduino: 1.8.12 (Windows 10), Board: “AI Thinker ESP32-CAM”
sketch_aug11a:203:38: error: stray ‘@’ in program
smtpData.addRecipient(theranger1953@gmail.com);
^
C:\Users\TheRa\OneDrive\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino: In function ‘void sendPhoto()’:
sketch_aug11a:203:25: error: ‘theranger1953’ was not declared in this scope
smtpData.addRecipient(theranger1953@gmail.com);
^
C:\Users\TheRa\OneDrive\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino: In function ‘void sendCallback(SendStatus)’:
sketch_aug11a:224:29: error: expected ‘}’ at end of input
Serial.println(msg.info());
^
Multiple libraries were found for “WiFi.h”
Used: C:\Users\TheRa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
Multiple libraries were found for “SD.h”
Used: C:\Users\TheRa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\SD
Not used: C:\Program Files (x86)\Arduino\libraries\SD
exit status 1
stray ‘@’ in program
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
If I do not put the @ symbol in the email address I get an error stating that the email address has not been defined.
Are you missing single or double quotes around your string literal? error: ‘theranger1953’ was not declared in this scope is looking for a variable named theranger1953.
smtpData.addRecipient(theranger1953@gmail.com);
smtpData.addRecipient('theranger1953@gmail.com');
Oh, and don’t worry about the “Multiple libraries were found” error messages so long as the sketch is picking up the correct libraries. Basically the built-in library and the one you added for ESP32 is conflicting in name. It looks like it is picking the correct one for ESP32 though. You could go and delete the libraries out of C:\Program Files (x86)\Arduino\libraries if you’d like.
Hi Mike.
Take a look at Steve’s answer and see if you can solve your problem.
Thanks for answering, Steve.
Regards,
Sara
I apologize for all of the confusion. Seems like a TBI has me struggling with these codes. The Single quotes indicate changing strings? True? I have the double quote in there although I do not think they were in the original. I am really trying to get a simple code to work so that I can trouble shoot it myself with out bothering everyone else. God bless for all of your held.
If something like this is not surrounded by quotes it is assumed it’s a variable. As such you will get a “not declared in this scope” error.
Another error I missed: error: stray ‘@’ in program. The same reason. The email address is not surrounded by quotes.
A string literal is just a string of characters surrounded by quotes.
For a mutable (ie. Changeable) string you could use:
String emailAddress = "theranger1953@gmail.com";
smtpData.addRecipient(emailAddress);
You may want to take an online course on how to program with Arduino.