PHP code example of trensy / aliyun-direct-mail
1. Go to this page and download the library: Download trensy/aliyun-direct-mail library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
trensy / aliyun-direct-mail example snippets
$region = "cn-hangzhou";
$appKey = "xxxx";
$appSecret = "xxxxx";
$accountName = "[email protected]";
$accountAlias = "service";
$obj = new \Trensy\DirectMail\Mail($region, $appKey, $appSecret, $accountName, $accountAlias);
$obj->send("[email protected]", "hello world", "hello world");