I am trying to send an email from my ESP8266 hardware using Blynk.email(address, subject, body). The problem is that I’m unable to use a String variable for the address field. I can use a String variable for the subject and body, just not the email address. I get an Arduino compile error if I try to use a variable for the address.
String emailAddress = "xyz@gmail.com";
String subject = "mySubject";
String body = "Email body";
//This compiles.
// Blynk.email("xyz@gmail.com", subject, body);
// This doesn't compile. Only difference is 1st parameter.
Blynk.email(emailAddress, subject, body);
The compiler throws the following error:
no matching function for call to 'BlynkWifi::email(String&, String&, String&)'
Have any of you had success using a variable, instead of a literal string for the address parameter of Blynk.email?
Thanks @Gunner. I will do some more testing. In my situation, the user will enter their own email address via the blynk terminal field, so I can’t use const char. I sure hope blynk doesn’t “require” a constant. That would be very limiting.