PHPMailer隐藏SMTP身份验证? [英] PHPMailer Hide SMTP Authentication?

查看:111
本文介绍了PHPMailer隐藏SMTP身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好,我正在使用PHPMailer发送电子邮件.

Ok, I'm using PHPMailer to send email.

因此,在php代码中,我添加了我的SMTP用户名,即我的gmail帐户 和SMTP密码,这是我的gmail帐户密码.

So in the php code I add my SMTP username, which is my gmail account and the SMTP password, which is my gmail account password.

所以我的GMAIL帐户访问权限已暴露在php代码中,尽管该服务器 在解释后将其丢弃,因此没人能看到它,我的问题 是,这可靠吗? 我应该在代码中保留gmail访问权限还是应该将其保存在数据库中?

So my GMAIL ACCOUNT ACCESS is EXPOSED in php CODE, although the server discards the php after it's been interpreted so nobody can see it, my question is, is this reliable? Should I leave my gmail access in the code or should I save it in my database?

预先感谢

推荐答案

任何有权访问您代码的开发人员都可以访问您的凭据.将这些信息保存在数据库中可能会使访问细节变得有些困难,但只是略微困难.

Any developer with access to your code will be able to access your credentials. Saving these in a database may make it a little tougher to gain access to the details, but only slightly.

如果您真的担心所使用的凭据,请创建一个专用于您的网站的帐户,不要使用个人帐户.

If you are truly concerned about the credentials used, create an account dedicated to your site and do not use a personal account.

这篇关于PHPMailer隐藏SMTP身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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