-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86da92b
commit 6784d3c
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,58 @@ $success = $improvMx->client()->domains()->delete("domain.com"); | |
$details = $improvMx->client()->domains()->checkDomainValidity("domain.com"); | ||
``` | ||
|
||
### Aliases | ||
|
||
```php | ||
$improvMx = new ImprovMX(); | ||
|
||
// Return a collection of Alias entities for a domain. | ||
$aliases = $improvMx->client()->aliases()->list("domain.com"); | ||
|
||
// This command sets up email forwarding from [email protected] to [email protected]. | ||
// Returns the newly created Alias entity or null (if failed to create). | ||
$improvMx->client()->aliases()->add("domain.com", "user", "[email protected]"); | ||
|
||
// Return the Alias entity (or null) for a given alias e.g. ([email protected]). | ||
$alias = $improvMx->client()->aliases()->get("domain.com", "alias"); | ||
|
||
// Update the forwarding address for an alias - returns the Alias entity or null. | ||
$improvMx->client()->aliases()->update("domain.com", "alias", "[email protected]"); | ||
|
||
// Returns delete successful - true or false. | ||
$success = $improvMx->client()->aliases()->delete("domain.com", "alias"); | ||
``` | ||
|
||
### Logs | ||
|
||
```php | ||
$improvMx = new ImprovMX(); | ||
|
||
// Return a collection of Log entities for a domain. | ||
$logs = $improvMx->client()->logs()->getDomainLogs("domain.com"); | ||
|
||
// Return a collection of Log entities for a domain's alias. | ||
$logs = $improvMx->client()->logs()->getAliasLogs("domain.com", "alias"); | ||
``` | ||
|
||
### SMTP Credentials | ||
|
||
```php | ||
$improvMx = new ImprovMX(); | ||
|
||
// Return a collection of Credential entities for a domain. | ||
$credentials = $improvMx->client()->smtpCredentials()->list("domain.com"); | ||
|
||
// Add a new SMTP account for a domain (returns with the Credential entity or null). | ||
$logs = $improvMx->client()->smtpCredentials()->add("domain.com", "username", "password"); | ||
|
||
// Update the password for an SMTP account (by username) - returns the Credential entity or null. | ||
$improvMx->client()->smtpCredentials()->update("domain.com", "username", "newPassword"); | ||
|
||
// Returns delete successful - true or false. | ||
$success = $improvMx->client()->smtpCredentials()->delete("domain.com", "username"); | ||
``` | ||
|
||
## Security | ||
|
||
If you discover a security vulnerability within this package, please send an email to Bespoke Technology Labs at [email protected]. All security vulnerabilities will be promptly addressed. You may view our full security policy [here](https://github.com/BespokeTechLabs/ImprovMX-PHP-Client/security/policy). | ||
|