When using a gmail smtp server, the recipient address needs to be a valid email format (with a @ followed by a .)
Here is a function that can check that
bool is_email(std::string const& address) {
size_t at_index = address.find_first_of('@', 0);
return at_index != std::string::npos
&& address.find_first_of('.', at_index) != std::string::npos;
}
This function could be called in the send function of the smtp client.
Sorry, I'm a very beginner with Github ...
When using a gmail smtp server, the recipient address needs to be a valid email format (with a @ followed by a .)
Here is a function that can check that
bool is_email(std::string const& address) {
size_t at_index = address.find_first_of('@', 0);
return at_index != std::string::npos
&& address.find_first_of('.', at_index) != std::string::npos;
}
This function could be called in the send function of the smtp client.
Sorry, I'm a very beginner with Github ...