Skip to content

Remove Undeliverable Mail from the queue #8

@Taprik

Description

@Taprik

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 ...

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions