DigitalOceanPHP / Client

DigitalOcean API v2 client for PHP
MIT License
709 stars 205 forks source link

Add MX domain record #196

Closed fedekrum closed 4 years ago

fedekrum commented 6 years ago

Hi...more than an issue is a favor !!!

Can you put on the main page an example of adding a MX record to a domain? I can't make it work.

Thanks

John-Henrique commented 5 years ago

Late but, just use...

// your connection...

$domainRecord = $digitalocean->domainRecord();

// domain, type, name_record, data_record, priority (priority is unecessary)
$created = $domainRecord->create( 'mydomain.com', 'MX', '@', 'alt5.aspmx.l.google.com.', '3' );