public class SendEmail extends Object
| Constructor and Description |
|---|
SendEmail(String emailAddress,
String emailPassword,
String emailSMTPHost) |
SendEmail(String emailAddress,
String emailPassword,
String emailSMTPHost,
boolean debug) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(String attachmentPath)
添加一个附件
|
void |
addContent(String content) |
void |
addImage(List<ImageParameter> images)
添加多个图片
|
void |
addImage(String imagePath,
String content)
添加一张图片
|
void |
addReceive(List<ReceiveAccount> receiveAccounts)
添加多个收件人
|
void |
addReceive(ReceiveAccount receiveAccount)
添加收件人
|
String |
getPersonal() |
List<ReceiveAccount> |
getReceiveAccounts() |
void |
saveChange()
保存更改
|
void |
sendEmail()
发送邮件
|
void |
setPersonal(String personal) |
void |
setReceiveAccounts(List<ReceiveAccount> receiveAccounts) |
void |
setSubject(String subject)
设置邮件主题
|
public SendEmail(String emailAddress, String emailPassword, String emailSMTPHost) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingExceptionjavax.mail.MessagingExceptionpublic SendEmail(String emailAddress, String emailPassword, String emailSMTPHost, boolean debug) throws UnsupportedEncodingException, javax.mail.MessagingException
UnsupportedEncodingExceptionjavax.mail.MessagingExceptionpublic void addReceive(ReceiveAccount receiveAccount) throws UnsupportedEncodingException, javax.mail.MessagingException
receiveAccount - UnsupportedEncodingExceptionjavax.mail.MessagingExceptionpublic void setSubject(String subject) throws javax.mail.MessagingException
subject - javax.mail.MessagingExceptionpublic void addReceive(List<ReceiveAccount> receiveAccounts) throws UnsupportedEncodingException, javax.mail.MessagingException
receiveAccounts - UnsupportedEncodingExceptionjavax.mail.MessagingExceptionpublic void addImage(String imagePath, String content) throws javax.mail.MessagingException
imagePath - 图片地址content - 图片描述javax.mail.MessagingExceptionpublic void addImage(List<ImageParameter> images) throws javax.mail.MessagingException
images - javax.mail.MessagingExceptionpublic void addAttachment(String attachmentPath) throws UnsupportedEncodingException, javax.mail.MessagingException
attachmentPath - 附件地址UnsupportedEncodingExceptionjavax.mail.MessagingExceptionpublic void addContent(String content) throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void saveChange()
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void sendEmail()
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic List<ReceiveAccount> getReceiveAccounts()
public void setReceiveAccounts(List<ReceiveAccount> receiveAccounts)
public String getPersonal()
public void setPersonal(String personal)
Copyright © 2021. All rights reserved.