This email better not send from the client side. Write a server side http api and accept request from the client side application, then send the email on server.
Send validation email from C++ application
-
01-07-2022 - |
Question
I'm developing a cross-platform C++11 application and I need to send a validation email to a user-entered address to make sure his email account exists and is valid.
I know there are temporary mail services like mailinator, but honestly I feel like a validation email is a good approach in my case since it gives people malicious intention more work to do to circumvent the system and also goes well with the rest of the application (example: having the email address allow me to automatically send status updates to users).
I have searched on the internet but I haven't been able to find a portable, cross-platform way to achieve this, at least without introducing big dependencies.
How can this issue be solved?
Solution
OTHER TIPS
Given that we don't even have networking(!) in the C++11 standard (not to mention the POP3, SMTP or the IMAP protocols on the top of it), I am afraid you cannot do it without "introducing big dependencies."
If you are willing to use third party libraries
implementint the protocols yourself on the top of
boost::asio
are viable options depending on your needs and licensing requirements.