You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
934 B
36 lines
934 B
package com.example;
|
|
|
|
import com.example.frame.mail.WMailSender;
|
|
import com.example.frame.mail.message.WHtmlInlineMessage;
|
|
import com.example.frame.mail.message.WTextMessage;
|
|
import org.junit.Test;
|
|
import org.junit.runner.RunWith;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import java.io.File;
|
|
|
|
/**
|
|
* UtilTest - - 测试用例
|
|
*
|
|
* @author wangbing
|
|
* @version 0.0.1
|
|
* @since 2017-01-01
|
|
*/
|
|
@RunWith(SpringRunner.class)
|
|
@SpringBootTest
|
|
@Transactional
|
|
public class MailTest {
|
|
|
|
@Test
|
|
public void testGeneratePwd() {
|
|
WTextMessage message = new WTextMessage();
|
|
message.setSubject("测试");
|
|
message.setContent("测试");
|
|
message.setFrom("wangbing@wbsite.xyz");
|
|
message.setTo("1919101440@qq.com");
|
|
WMailSender.send(message);
|
|
}
|
|
}
|