ziming / laravel-email-sniper-link
Laravel 包,根据给定的邮箱地址生成狙击链接
1.3
2024-03-24 08:25 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^10.0|^11.0
- mobiledetect/mobiledetectlib: ^4.8
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8|^8.0
- orchestra/testbench: ^8.8|^9.0
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
README
此包可以帮助您为您的邮箱生成狙击链接,这使得人们更容易找到您的邮箱。
关于什么是邮箱狙击链接的快速解释,您可以查看下面的链接。
https://growth.design/sniper-link
一个常见的用例是用于您的验证邮箱页面。
此包目前可以生成以下邮箱的狙击链接:
- Google Mail
- Outlook
- Yahoo Mail
- Proton Mail
- iCloud Mail
支持我们
您可以捐款或提出改进建议
安装
您可以通过 Composer 安装此包
composer require ziming/laravel-email-sniper-link
用法
use Ziming\LaravelEmailSniperLink\LaravelEmailSniperLink; // This just do a quick guess based on the ending email address such as gmail.com, outlook.com, icloud.com etc. LaravelEmailSniperLink::getSniperLinkQuick('receiver@gmail.com', 'optional-from-email-that-proton-mail-uses@gmail.com') // This will do a more accurate guess by not only checking the ending email address but also the MX record of the email address // if the email address domain is not 1 of the common ones. // Which is more useful for business emails. But it does make network calls to fetch the MX records, so it is a little slower LaravelEmailSniperLink::getSniperLink('receiver@gmail.com', 'optional-from-email@gmail.com')
LaravelEmailSniperLink
类还有更多静态方法,可能对您很有用。
还有一些辅助函数可用。目前有 2 个。
// This just do a quick guess based on the ending email address such as gmail.com, outlook.com, icloud.com etc. email_sniper_link_quick(string $receiverEmail, ?string $fromEmail = null); // This will do a more accurate guess by not only checking the ending email address but also the MX record of the email address // if the email address domain is not 1 of the common ones. // Which is more useful for business emails. But it does make network calls to fetch the MX records, so it is a little slower email_sniper_link(string $receiverEmail, ?string $fromEmail = null);
测试
composer test
更新日志
有关最近更改的更多信息,请参阅 更新日志。
贡献
请参阅 贡献指南 以获取详细信息。
安全漏洞
请查阅 我们的安全策略 了解如何报告安全漏洞。
鸣谢
许可证
MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件。