1、Mandrill 免费配额12000封/月有API
7 N9 f% [* J+ z! a, m' K
' L f/ B0 S5 Z; c2、Mandrill给免费用户每月12000封的发邮件配额,平均一天是400封,提供了SMTP API,支持curl、JSON、python、php、ruby、nodejs、dart等。PHP的代码示例如下:
# t* q! C( i* ]' \$ C9 e- <?php
N5 r# Y K9 t8 w5 k
. @; V' [9 p7 d: J9 ?- c- include_once "swift_required.php";6 _3 I* T1 B4 A' ^; B$ H: A+ e2 G
6 X0 p) R2 h" V( ?/ p6 j8 h3 _- //
1 v6 o/ j) H/ K, i) N" f! O, t6 O* p8 p - 7 J V) @8 ?. |- u6 }" u
- $transport = Swift_SmtpTransport::newInstance('smtp.mandrillapp.com', 587);6 \4 V1 V" W- I- \
- $transport->setUsername($MANDRILL_USERNAME);- D/ T) e3 S9 U" P
- $transport->setPassword($MANDRILL_PASSWORD);/ R A! b2 I5 J' G8 y8 W t) {
- $swift = Swift_Mailer::newInstance($transport);1 G. C8 T0 F% h$ Q- c, `9 T
2 N5 D8 `% \8 c4 d- //. U3 d: F1 B4 w( S9 j! M' u! f
( z }5 j* h/ w" O' t, n- ?>
复制代码 3、Mandrill 注册时需要挂上DL,因为Mandrill已经不支持国内IP注册,不过使用没有问题。
0 R! A( ? R0 F: j- o
. W+ T' R7 M5 j( A7 [官方网站:https://www.mandrill.com/
6 }+ M, C7 V0 O. M' f" d' @ |