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.system.ClientMapper;
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.lang3.time.DateUtils;
@ -22,8 +18,6 @@ import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.Resource;
@ -46,8 +40,8 @@ public class CustomerImpressionImplTest {
private ClientMapper clientMapper;
@Resource
private OrgMapper orgMapper;
@Resource
private MailGunClient mailGunClient;
// @Resource
// private MailGunClient mailGunClient;
// @Test
// public void redisQueue() {
@ -125,22 +119,22 @@ public class CustomerImpressionImplTest {
return authHeader;
}
@Test
public void sendSimpleMessages() throws Exception {
SendMail sendMail = new SendMail();
sendMail.setContent("<html><p>Hi kira</p ></html>");
Set<String> mailCCs = new HashSet<>();
mailCCs.add("164851225@qq.com");
sendMail.setMailCcs(mailCCs);
Set<String> mailtos = new HashSet<>();
mailtos.add("1029811920@qq.com");
sendMail.setMailTos(mailtos);
sendMail.setTitle("Final Test");
JSONObject result = mailGunClient.sendMail(sendMail);
System.out.println(result.toJSONString());
System.out.println(result.toJSONString());
System.out.println(result.toJSONString());
}
// @Test
// public void sendSimpleMessages() throws Exception {
// SendMail sendMail = new SendMail();
// sendMail.setContent("<html><p>Hi kira</p ></html>");
// Set<String> mailCCs = new HashSet<>();
// mailCCs.add("164851225@qq.com");
// sendMail.setMailCcs(mailCCs);
// Set<String> mailtos = new HashSet<>();
// mailtos.add("1029811920@qq.com");
// sendMail.setMailTos(mailtos);
// sendMail.setTitle("Final Test");
//
// JSONObject result = mailGunClient.sendMail(sendMail);
// System.out.println(result.toJSONString());
// System.out.println(result.toJSONString());
// System.out.println(result.toJSONString());
// }
}
Loading…
Cancel
Save