master
wangning 7 years ago
parent 601e678e09
commit b55f8e3f9d

@ -3,10 +3,6 @@ package au.com.royalpay.payment.manage.apps.core.impls;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper; import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.tools.mail.MailGunClient;
import au.com.royalpay.payment.tools.mail.SendMail;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
@ -22,8 +18,6 @@ import java.io.IOException;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Date; import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -46,8 +40,8 @@ public class CustomerImpressionImplTest {
private ClientMapper clientMapper; private ClientMapper clientMapper;
@Resource @Resource
private OrgMapper orgMapper; private OrgMapper orgMapper;
@Resource // @Resource
private MailGunClient mailGunClient; // private MailGunClient mailGunClient;
// @Test // @Test
// public void redisQueue() { // public void redisQueue() {
@ -125,22 +119,22 @@ public class CustomerImpressionImplTest {
return authHeader; return authHeader;
} }
@Test // @Test
public void sendSimpleMessages() throws Exception { // public void sendSimpleMessages() throws Exception {
SendMail sendMail = new SendMail(); // SendMail sendMail = new SendMail();
sendMail.setContent("<html><p>Hi kira</p ></html>"); // sendMail.setContent("<html><p>Hi kira</p ></html>");
Set<String> mailCCs = new HashSet<>(); // Set<String> mailCCs = new HashSet<>();
mailCCs.add("164851225@qq.com"); // mailCCs.add("164851225@qq.com");
sendMail.setMailCcs(mailCCs); // sendMail.setMailCcs(mailCCs);
Set<String> mailtos = new HashSet<>(); // Set<String> mailtos = new HashSet<>();
mailtos.add("1029811920@qq.com"); // mailtos.add("1029811920@qq.com");
sendMail.setMailTos(mailtos); // sendMail.setMailTos(mailtos);
sendMail.setTitle("Final Test"); // sendMail.setTitle("Final Test");
//
JSONObject result = mailGunClient.sendMail(sendMail); // JSONObject result = mailGunClient.sendMail(sendMail);
System.out.println(result.toJSONString()); // System.out.println(result.toJSONString());
System.out.println(result.toJSONString()); // System.out.println(result.toJSONString());
System.out.println(result.toJSONString()); // System.out.println(result.toJSONString());
} // }
} }
Loading…
Cancel
Save