dniccum / mailgun-domain-verification
A Laravel Nova resource tool that allows you to add domains to a Mailgun account and verify their status.
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Language:Vue
Requires
- php: >=7.1.0
- illuminate/support: ^6.0|^7.0|^8.0
- mailgun/mailgun-php: ^2.6
- php-http/guzzle6-adapter: ^1.1
- php-http/message: ^1.6
README
A Laravel Nova resource tool that allows users to dynamically and programatically add domains to their Mailgun account and verify their status by providing the necessary TXT and CNAME records.
Requirements
You will need the following items to use this tool:
- A valid Mailgun account
- A private API key associated with your Mailgun account
Installation
To install this tool, use the installation code below:
composer require dniccum/mailgun-domain-verification
Usage
Environment variable
If you have haven't already, you will need to add the Mailgun API key to your .env
file like so:
MAILGUN_SECRET="key-XXXXXXXXXXXXXXXXXXXX"
Code
To use the tool, add the following code to your Nova resource.
use Dniccum\MailgunDomainVerification\MailgunDomainVerification; MailgunDomainVerification::make()
By default, the tool will look for the email_address_domain
column in the database.
Options
resourceAttribute
If you would like to change the database column that the tool uses for domain validation, use the resourceAttribute
option like so:
MailgunDomainVerification::make() ->resourceAttribute('domain')
Resource
After all of the appropriate credentials are in place, and no errors appear, click the "Add Domain" button to add the domain to your Mailgun account.
Once done, the tool will provide you with the necessary TXT and CNAME records for you to add to your domain.
Credits
License
The MIT License (MIT). Please see License File for more information.