manyTool基于阿里云實(shí)現(xiàn)的快速發(fā)送短信郵件工具包
項(xiàng)目介紹
多平臺(tái)匯集的sdk,目前實(shí)現(xiàn)了基于阿里云api的短信以及郵件的封裝,可以實(shí)現(xiàn)郵件、國(guó)內(nèi)短信的發(fā)送。
基于阿里云已實(shí)現(xiàn)功能
郵件發(fā)送[√]
國(guó)內(nèi)短信發(fā)送[√]
使用參考 //短信 System.out.println(MobileExt.sendMobileSms("***","18912344321","XX助手", "{"oId":"12","words":"45","time":"2018-8-6"}","SMS_136","***"));
//郵件 System.out.println(EmailExt.sendEmail("***", "[email protected]", "[email protected]", "管理員","123","測(cè)試郵件","***"));
安裝教程
pom.xml 粘貼即可使用。
<dependency> <groupId>com.github.yuanxy</groupId> <artifactId>focus-sdk</artifactId> <version>1.0.0</version> </dependency>
注意如果你項(xiàng)目有用到 httpcomponents 請(qǐng)注意你的版本,如果運(yùn)行報(bào)錯(cuò),請(qǐng)復(fù)制下面的配置到pom.xml
<dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>4.3.1</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> <version>4.3.1</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient-cache</artifactId> <version>4.3.1</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.3.1</version> </dependency> <!--apacheHttp-->
使用說(shuō)明
確認(rèn) pom.xml 添加了 focus-sdk 的配置信息
阿里短信 MobileExt.sendMobileSms("","","","","","");
阿里郵件 EmailExt.sendEmail("","","","","","","");
評(píng)論
圖片
表情
