Email address

Hi all,
I’m trying to use a string variable to contain an email address looked up from an SD card file.
If I code it just as advised, it compiles fine. But, if I replace "" with a string variable eMailAddress, the compiler chokes.
Thanks in advance.

PS: Blynk is the coolest ever!

Search this forum for keywords like email and String… there are various procedures to building a single string from multiple sources prior to emailing it. It is actually an Arduino code thing, not specific to Blynk, so Googling how strings work is also advisable.

Well, if the compiler kicks out an error when a string variable is used as opposed to a literal string, does it matter how the string was built?

Check your compiler error. I am not super savvy on String theory :stuck_out_tongue_winking_eye: I Google a lot to figure it out and keep trying till it works.

For example, this is what I have in one of my projects… note how I built up the body before processing it in the email command.

void StartUpEmail()
  String emailAddress = "";
  String subject = "Mega CodeShield Started";
  String body = "Your CodeShield progect on the Mega has started at " + String(currentTime) + " on " + String(currentDate);, subject.c_str(), body.c_str());

I’ll give it a try.

BTW, a string entry widget would be nice.
One can use the terminal as such but it would be really nice to have separate entries like: Fname, Lname, email…
When a button is pushed it can consolidate all and create a record via SD.

There is a text input widget added to the latest Android Blynk app.

Any estimate on iOS version?

In a week or so.

@Gunner, the code you provided worked and it’s sending out emails.