techendeavors / emailautodiscover
接收一个电子邮件地址或域名,并尝试获取配置电子邮件客户端所需的自动配置设置。
1.0.2
2018-07-23 23:07 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3
- illuminate/contracts: ^5.6
- illuminate/support: ^5.6
- techendeavors/dnsoverhttps: ^1.0
Requires (Dev)
- orchestra/testbench: ~3.0
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-09-24 12:50:01 UTC
README
接收一个电子邮件地址或域名,并尝试获取配置电子邮件客户端所需的自动配置设置。
待办事项
- [ ] 首先检查MX记录
- [ ] 确保所有变量都通过常量设置,但可以通过配置文件覆盖
- [ ] 在使用之前检查DNSOverHttps的加载
- [ ] 通过捕获异常更干净地处理各种Guzzle/Curl错误
- [ ] 修复Exchange自动配置检测
- [ ] 创建一个配置猜测系统
- [ ] 检查MX记录
- [ ] 检查SPF记录
- [ ] 检查常见邮件服务器第三级域名
- [ ] 在常见端口连接可能的第三级域名
- [ ] 寻找常见的第三方级域名的webmail并尝试确定webmail平台
安装
您可以通过composer安装此包
composer require techendeavors/emailautodiscover
使用方法
>>> $test = new EmailAutoDiscover;
=> Techendeavors\EmailAutoDiscover\EmailAutoDiscover {#2863}
>>> $test->check('gmail.com')
=> [
"displayName" => "Google Mail",
"displayShortName" => "GMail",
"incoming" => [
[
"type" => "imap",
"hostname" => "imap.gmail.com",
"port" => "993",
"socketType" => "SSL",
"username" => "%EMAILADDRESS%",
"authentication" => [
"OAuth2",
"password-cleartext",
],
],
[
"type" => "pop3",
"hostname" => "pop.gmail.com",
"port" => "995",
"socketType" => "SSL",
"username" => "%EMAILADDRESS%",
"authentication" => "password-cleartext",
],
],
"outgoing" => [
[
"type" => "smtp",
"hostname" => "smtp.gmail.com",
"port" => "465",
"socketType" => "SSL",
"username" => "%EMAILADDRESS%",
"authentication" => [
"OAuth2",
"password-cleartext",
],
],
],
"documenation" => [
[
"url" => "http://mail.google.com/support/bin/answer.py?answer=13273",
"description" => "How to enable IMAP/POP3 in GMail",
],
[
"url" => "http://mail.google.com/support/bin/topic.py?topic=12806",
"description" => "How to configure email clients for IMAP",
],
[
"url" => "http://mail.google.com/support/bin/topic.py?topic=12805",
"description" => "How to configure email clients for POP3",
],
[
"url" => "http://mail.google.com/support/bin/answer.py?answer=86399",
"description" => "How to configure TB 2.0 for POP3",
],
],
"source" => "https://autoconfig.thunderbird.net/v1.1/gmail.com",
]
>>>
>>> $test->check('techendeavors.com')
=> [
"displayName" => "Techendeavors Mail",
"displayShortName" => "Techendeavors",
"incoming" => [
[
"type" => "imap",
"hostname" => "mail.techendeavors.com",
"port" => "143",
"socketType" => "STARTTLS",
"username" => "%EMAILADDRESS%",
"authentication" => "password-cleartext",
],
],
"outgoing" => [
[
"type" => "smtp",
"hostname" => "mail.techendeavors.com",
"port" => "587",
"socketType" => "STARTTLS",
"username" => "%EMAILADDRESS%",
"authentication" => "password-cleartext",
],
],
"source" => "https://autoconfig.techendeavors.com/mail/config-v1.1.xml",
]
>>>
>>> $test->check('example.com')
=> false
测试
composer test
变更日志
请参阅变更日志以获取有关最近更改的更多信息。
贡献
请参阅贡献指南以获取详细信息。
安全
如果您发现任何与安全相关的问题,请使用问题跟踪器
致谢
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。