简体   繁体   English

使用C#WinForm将应用程序注册信息发送到我的Gmail

[英]Using C# WinForm to send application registration information to a my gmail

I have a application I'm currently working on and it includes a form that allows the user to register it. 我有一个正在使用的应用程序,它包括一个允许用户注册的表格。 I have the information stored in a string and I would like that information emailed to my gmail account. 我将信息存储在字符串中,我希望将该信息通过电子邮件发送到我的gmail帐户。 I searched online and I was able to send it using my gmail account but not everyone has gmail and the code requires a password from the sender. 我在网上搜索,可以使用自己的gmail帐户发送该邮件,但并非所有人都拥有gmail,并且该代码要求发送者提供密码。

is there a way to do this? 有没有办法做到这一点?

In your code you can provide credentials for your gmail account you can use to send emails to other accounts. 在您的代码中,您可以为自己的 gmail帐户提供凭据,然后将其用于向其他帐户发送电子邮件。 Check System.Net.Mail namespace - you can start here: 检查System.Net.Mail命名空间-您可以从此处开始:

http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx http://msdn.microsoft.com/zh-CN/library/system.net.mail.smtpclient.aspx

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

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