-
Hello, I got the example Currently I have modified the example in
I don't find it very nice but it works :-(
by variables nor of what types they must be thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
You can assign all config properties and all input parameters of functions in this library that accepted string with Arduino String, std::string, const char*, chars array, string literal, flash string pointer (F and FPSTR). In the examples, it use F() macro to show that the library support F() string for input too. Examples: String mail1 = "[email protected]";
std::string mail2= "[email protected]";
const char *mail3 = "[email protected]";
session.login.email = "[email protected]";
session.login.email = F("[email protected]");
session.login.email = FPSTR("[email protected]");
session.login.email = mail1;
session.login.email = mail2;
session.login.email = mail3;
String recp_name= "steve";
String recp_email= "[email protected]";
message.addRecipient (recp_name, recp_email);
//For string concatenation
String recp_name2 = "peter";
String recp_email2 = recp_name2+ "@smith.com";
message.addRecipient (recp_name2 , recp_email2); AUTHOR_EMAIL is your (sender) email address. |
Beta Was this translation helpful? Give feedback.
-
If you don't have experiences to use char array in C/C++, please avoid it as this may lead to memory leaks and unexpected result when you allocate and don't deallocate it properly. Please use Arduino's String class or basic string (std::string) instead. |
Beta Was this translation helpful? Give feedback.
-
This is invalid for converting a string constant to char array This is valid You can learn the basic char array usage But as I mentioned above this may lead to memory leaks and device crashed as you don't manage it properly. |
Beta Was this translation helpful? Give feedback.
You can assign all config properties and all input parameters of functions in this library that accepted string with Arduino String, std::string, const char*, chars array, string literal, flash string pointer (F and FPSTR).
In the examples, it use F() macro to show that the library support F() string for input too.
Examples: