发送电​​子邮件没有硬编码的用户​​名和密码 [英] Sending email without hard-coding username and password

查看:128
本文介绍了发送电​​子邮件没有硬编码的用户​​名和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有发送从C#的邮件,而无需手动编码使用Gmail SMTP我的用户名和密码的方法吗?

Is there any way of sending an email from C# without manually coding my user name and password using Gmail SMTP?

我知道有一些软件,可以看到源代码,我真的不喜欢他们看到我的Gmail密码。

I know that there is some software that can see the source code, and I don't really like them seeing my Gmail password.

推荐答案

您不应该使用用户在别人正在运行的应用程序名和密码。

You shouldn't be using your user name and password in an application that someone else is running.

修改应用程序,以便它提示用户输入的及其的电子邮件凭证和使用这些

Modify the application so that it prompts the user for their e-mail credentials and use those.

这将必须被存储在配置文件中,并且可以仍然通过别人除非你存储<击>散列加密密码被读

This will have to be stored in a configuration file and can still be read by someone else unless you store the hashedencrypted password.

这篇关于发送电​​子邮件没有硬编码的用户​​名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆