简体   繁体   English

从C ++应用程序发送验证电子邮件

[英]Send validation email from C++ application

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. 我正在开发一个跨平台的C ++ 11应用程序,需要将验证电子邮件发送到用户输入的地址,以确保他的电子邮件帐户存在并且有效。

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). 我知道有一些临时邮件服务,例如mailinator ,但老实说,我觉得验证电子邮件是一种不错的方法,因为它使人们怀有恶意意图绕开系统进行更多工作,并且与其他应用程序也能很好地配合使用(例如:使用电子邮件地址可以让我自动将状态更新发送给用户)。

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? 如何解决这个问题?

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. 编写服务器端http api并接受来自客户端应用程序的请求,然后在服务器上发送电子邮件。

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." 鉴于我们甚至在C ++ 11标准中都没有网络(!)(更不用说POP3,SMTP或IMAP协议位于其顶部),恐怕您不能在没有“引入大的依赖关系”的情况下做到这一点。 “。

If you are willing to use third party libraries 如果您愿意使用第三方库

are viable options depending on your needs and licensing requirements. 是可行的选择,具体取决于您的需求和许可要求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM