类 UMail
java.lang.Object
com.gdxsoft.easyweb.utils.UMail
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static SendMailcreateSendMail(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset) Create a SendMailstatic StringgetEmailDomain(String email) Get the domain from the emailstatic javax.mail.Session已过时。static javax.mail.internet.MimeMessagegetMimeMessage(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset) Get a mime messagestatic javax.mail.internet.MimeMessagegetMimeMessage(String from, String to, String subject, String content) Get a mime messagestatic javax.mail.internet.MimeMessagegetMimeMessage(String from, String fromName, String to, String toName, String subject, String content, String[] atts, String charset) Get a mime messagestatic StringsendHtmlMail(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset) Send a emailstatic StringsendHtmlMail(String from, String tos, String subject, String content) Send a emailstatic StringSend a emailstatic StringsendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content) Send a emailstatic StringsendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content, String[] atts) Send a emailstatic StringsendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content, String[] atts, String charset) Send a emailstatic StringsendHtmlMail(String from, String fromName, String tos, String toNames, String replyTos, String replyToNames, String subject, String content, String[] atts, String charset) Send a emailstatic StringsendMail(javax.mail.internet.MimeMessage message) Send a email
-
构造器详细资料
-
UMail
public UMail()
-
-
方法详细资料
-
getMailSession
已过时。Get the default MailSession (UPath)- 返回:
- MailSession
-
getMimeMessage
public static javax.mail.internet.MimeMessage getMimeMessage(String from, String to, String subject, String content) throws UnsupportedEncodingException, javax.mail.MessagingException Get a mime message- 参数:
from- The mail fromto- The mail tosubject- The mail subjectcontent- The mail content- 返回:
- message
- 抛出:
UnsupportedEncodingExceptionjavax.mail.MessagingException
-
getMimeMessage
public static javax.mail.internet.MimeMessage getMimeMessage(String from, String fromName, String to, String toName, String subject, String content, String[] atts, String charset) throws javax.mail.MessagingException, UnsupportedEncodingException Get a mime message- 参数:
from- The mail fromfromName- The mail from nameto- The mail totoName- The mail to namesubject- The mail subjectcontent- The mail contentatts- The attachmentscharset- The mail character set- 返回:
- message
- 抛出:
javax.mail.MessagingExceptionUnsupportedEncodingException
-
getMimeMessage
public static javax.mail.internet.MimeMessage getMimeMessage(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset) throws javax.mail.MessagingException, UnsupportedEncodingException Get a mime message- 参数:
from- The mail fromfromName- The mail from nametos- The mail tostoNames- The mail to namesccs- The mail ccsccNames- The mail cc namesbccs- The mail bccsbccNames- The mail bcc namesreplyTos- The mail replayTosreplyToNames- The mail replayTo namessender- The mail sendersenderName- The mail sender namesubject- The mail subjectcontent- The mail contentatts- The mail attachmentscharset- The mail character set- 返回:
- message
- 抛出:
javax.mail.MessagingExceptionUnsupportedEncodingException
-
createSendMail
public static SendMail createSendMail(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset) Create a SendMail- 参数:
from- The mail fromfromName- The mail from nametos- The mail tostoNames- The mail to namesccs- The mail ccsccNames- The mail cc namesbccs- The mail bccsbccNames- The mail bcc namesreplyTos- The mail replayTosreplyToNames- The mail replayTo namessender- The mail sendersenderName- The mail sender namesubject- The mail subjectcontent- The mail contentatts- The mail attachmentscharset- The mail character set- 返回:
- SendMail
-
getEmailDomain
Get the domain from the email- 参数:
email- The email- 返回:
- The domain
-
sendHtmlMail
public static String sendHtmlMail(String from, String fromName, String[] tos, String[] toNames, String[] ccs, String[] ccNames, String[] bccs, String[] bccNames, String[] replyTos, String[] replyToNames, String sender, String senderName, String subject, String content, String[] atts, String charset) Send a email- 参数:
from- The mail fromfromName- The mail from nametos- The mail tostoNames- The mail to namesccs- The mail ccsccNames- The mail cc namesbccs- The mail bccsbccNames- The mail bcc namesreplyTos- The mail replayTosreplyToNames- The mail replayTo namessender- The mail sendersenderName- The mail sender namesubject- The mail subjectcontent- The mail contentatts- The mail attachmentscharset- The mail character set- 返回:
- result
-
sendHtmlMail
public static String sendHtmlMail(String from, String fromName, String tos, String toNames, String replyTos, String replyToNames, String subject, String content, String[] atts, String charset) Send a email- 参数:
from- The mail fromfromName- The mail from nametos- The mail tos, separate with commastoNames- The mail to names, separate with commasreplyTos- The mail replayTos, separate with commasreplyToNames- The mail replayTo names separate with commassubject- The mail subjectcontent- The mail contentatts- The mail attachments- 返回:
- result
-
sendHtmlMail
public static String sendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content, String[] atts, String charset) Send a email- 参数:
from- The mail fromfromName- The mail from nametos- The mail tos, separate with commastoNames- The mail to names, separate with commassubject- The mail subjectcontent- The mail contentatts- The mail attachmentscharset- The character set- 返回:
- 是否成功
-
sendHtmlMail
public static String sendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content) Send a email- 参数:
from- The mail fromfromName- The mail from nametos- The mail tos, separate with commastoNames- The mail to names, separate with commassubject- The mail subjectcontent- The mail content- 返回:
- result
-
sendHtmlMail
public static String sendHtmlMail(String from, String fromName, String tos, String toNames, String subject, String content, String[] atts) Send a email- 参数:
from- The mail fromfromName- The mail from nametos- The mail tos, separate with commastoNames- The mail to names, separate with commassubject- The mail subjectcontent- The mail contentatts- The mail attachments- 返回:
- result
-
sendHtmlMail
public static String sendHtmlMail(String from, String tos, String subject, String content, String[] atts) Send a email- 参数:
from- The mail fromtos- The mail tos, separate with commassubject- The mail subjectcontent- The mail contentatts- The mail attachments- 返回:
- result
-
sendHtmlMail
Send a email- 参数:
from- The mail fromtos- The mail tos, separate with commassubject- The mail subjectcontent- The mail content- 返回:
- result
-
sendMail
Send a email- 参数:
message- The email message- 返回:
- result
-