@Component public class MailSender extends Object
| 构造器和说明 |
|---|
MailSender() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
sendAttachmentsEmail(String from,
String[] to,
String subject,
String content,
String attachmentFilename,
org.springframework.core.io.InputStreamSource inputStreamSource)
发送带附件的邮件
|
void |
sendHtmlEmail(String from,
String[] to,
String subject,
String content)
发送html邮件
|
void |
sendSimpleEmail(String from,
String[] to,
String subject,
String content)
发送简单邮件
|
public void sendSimpleEmail(String from, String[] to, String subject, String content)
from - 发送人to - 收件人subject - 主题content - 内容public void sendHtmlEmail(String from, String[] to, String subject, String content) throws javax.mail.MessagingException
from - 发件人to - 收件人subject - 主题content - 内容javax.mail.MessagingExceptionpublic void sendAttachmentsEmail(String from, String[] to, String subject, String content, String attachmentFilename, org.springframework.core.io.InputStreamSource inputStreamSource) throws javax.mail.MessagingException
from - 发件人to - 收件人subject - 主题content - 内容attachmentFilename - 附件名inputStreamSource - 附件内容javax.mail.MessagingExceptionCopyright © 2019. All rights reserved.