无需无穷无尽的文档!
我们的 API 非常易于使用,请看一下:要求 : https://api.emailroot.com/smtp/mail/send/
行动 : 通过 API 发送电子邮件
$apikey = "你的API";
$sender_name = urlencode("你的名字");
$sender_email = "yourmail@domain.com";
$mail_subject = urlencode("API 测试正常");
$mail_body = urlencode("HELLO WORLD!电子邮件测试");
$recipient_email = "mailDestination@domain.com";
$URL = "https://api.emailroot.com/smtp/mail/send/?apikey=".$apikey."&sender_name=".$sender_name."&sender_email=".$sender_email."&recipient_email=".$recipient_email ."&charset= ".$charset."&mail_subject=".$mail_subject."&mail_body=".$mail_body."&format=html";
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
回声 1TP4Allput =curl_exec($ch);
卷曲_关闭($ch);
$sender_name = urlencode("你的名字");
$sender_email = "yourmail@domain.com";
$mail_subject = urlencode("API 测试正常");
$mail_body = urlencode("HELLO WORLD!电子邮件测试");
$recipient_email = "mailDestination@domain.com";
$URL = "https://api.emailroot.com/smtp/mail/send/?apikey=".$apikey."&sender_name=".$sender_name."&sender_email=".$sender_email."&recipient_email=".$recipient_email ."&charset= ".$charset."&mail_subject=".$mail_subject."&mail_body=".$mail_body."&format=html";
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
回声 1TP4Allput =curl_exec($ch);
卷曲_关闭($ch);