public class GlueSpringMailSender extends Object
»ç¿ë¿¹) JavaMailSender mailSender = (JavaMailSender) GlueStaticContext.getBeanFactory().getBeanObject( "mailSender" ); GlueSpringMailSender glueMailSender = null; try { glueMailSender = new GlueSpringMailSender(mailSender); } catch ( Exception e1 ) { //¿¡·¯ ó¸® } String from = "º¸³»´Â »ç¶÷ Mail ÁÖ¼Ò"; String to = "¹Þ´Â »ç¶÷ Mail ÁÖ¼Ò"; String subject = "Á¦¸ñ"; String content = "³»¿ë"; String[] file = {"E:\\temp\\test.txt","E:\\temp\\test2.txt"}; try { glueMailSender.setFrom( from ); glueMailSender.setTo( to ); glueMailSender.setText( content ); glueMailSender.addFiles( file ); glueMailSender.sendMail(); } catch ( Exception e ) { //¿¡·¯ ó¸® }
Constructor and Description |
---|
GlueSpringMailSender(org.springframework.mail.javamail.JavaMailSender mailSender)
»ý¼ºÀÚ(constructor).
|
GlueSpringMailSender(org.springframework.mail.javamail.JavaMailSender mailSender,
boolean multipart)
»ý¼ºÀÚ(constructor).
|
GlueSpringMailSender(org.springframework.mail.javamail.JavaMailSender mailSender,
boolean multipart,
String encoding)
»ý¼ºÀÚ(constructor).
|
Modifier and Type | Method and Description |
---|---|
void |
addFile(String filepath)
Message¿¡ ÷ºÎÆÄÀÏ ¼³Á¤
|
void |
addFiles(String[] filepath)
Message¿¡ ÷ºÎÆÄÀÏ ¼³Á¤
|
org.springframework.mail.javamail.MimeMessageHelper |
getMessageHelper()
Spring¿¡¼ Á¦°øÇÏ´Â MimeMessageHelper¸¦ ¹ÝȯÇÑ´Ù.
|
void |
sendMail()
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMail(String from,
String[] to,
String subject,
String content)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMail(String from,
String[] to,
String subject,
String content,
String filepath)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMail(String from,
String[] to,
String subject,
String content,
String[] filepath)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMail(String from,
String to,
String subject,
String content)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMail(String from,
String to,
String subject,
String content,
String filepath)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMail(String from,
String to,
String subject,
String content,
String[] filepath)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMailHtml(String from,
String[] to,
String subject,
String content)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMailHtml(String from,
String[] to,
String subject,
String content,
String filepath)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMailHtml(String from,
String[] to,
String subject,
String content,
String[] filepath)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMailHtml(String from,
String to,
String subject,
String content)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMailHtml(String from,
String to,
String subject,
String content,
String filepath)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
sendMailHtml(String from,
String to,
String subject,
String content,
String[] filepath)
¼³Á¤µÈ Message¸¦ Mail·Î º¸³½´Ù.
|
void |
setBcc(String bcc)
Message¿¡ BCC ¼³Á¤
|
void |
setBcc(String[] bcc)
Message¿¡ BCC ¼³Á¤
|
void |
setCc(String cc)
Message¿¡ CC ¼³Á¤
|
void |
setCc(String[] cc)
Message¿¡ CC ¼³Á¤
|
void |
setFrom(String from)
Message¿¡ º¸³»´Â »ç¶÷ Mail ÁÖ¼Ò ¼³Á¤
|
void |
setSubject(String subject)
Message¿¡ Á¦¸ñ ¼³Á¤
|
void |
setText(String content)
Message¿¡ º»¹® ¼³Á¤
|
void |
setTextHtml(String content)
Message¿¡ º»¹®(HTMLÇü½Ä) ¼³Á¤
|
void |
setTo(String to)
Message¿¡ ¹Þ´Â »ç¶÷ Mail ÁÖ¼Ò ¼³Á¤
|
void |
setTo(String[] to)
Message¿¡ ¹Þ´Â »ç¶÷ Mail ÁÖ¼Ò ¼³Á¤
|
public GlueSpringMailSender(org.springframework.mail.javamail.JavaMailSender mailSender) throws javax.mail.MessagingException
mailSender
- GlueSpringMailSender¸¦ »ç¿ëÇϱâ À§Çؼ´Â SpringÀÇ JavaMailSender°¡ ²À ÇÊ¿äÇÏ´Ù.javax.mail.MessagingException
public GlueSpringMailSender(org.springframework.mail.javamail.JavaMailSender mailSender, boolean multipart) throws javax.mail.MessagingException
mailSender
- GlueSpringMailSender¸¦ »ç¿ëÇϱâ À§Çؼ´Â SpringÀÇ JavaMailSender°¡ ²À ÇÊ¿äÇÏ´Ù.multipart
- multipart ¿©ºÎ ÆÄÀÏ Ã·ºÎÇÒ °æ¿ì¿¡´Â ¹Ýµå½Ã true·Î ¼³Á¤(Default:true)javax.mail.MessagingException
public GlueSpringMailSender(org.springframework.mail.javamail.JavaMailSender mailSender, boolean multipart, String encoding) throws javax.mail.MessagingException
mailSender
- GlueSpringMailSender¸¦ »ç¿ëÇϱâ À§Çؼ´Â SpringÀÇ JavaMailSender°¡ ²À ÇÊ¿äÇÏ´Ù.multipart
- multipart ¿©ºÎ ÆÄÀÏ Ã·ºÎÇÒ °æ¿ì¿¡´Â ¹Ýµå½Ã true·Î ¼³Á¤(Default:true)encoding
- encoding ¼³Á¤(Default:UTF-8)javax.mail.MessagingException
public org.springframework.mail.javamail.MimeMessageHelper getMessageHelper()
public void sendMail()
public void sendMail(String from, String to, String subject, String content) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®Exception
public void sendMail(String from, String[] to, String subject, String content) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®Exception
public void sendMail(String from, String to, String subject, String content, String filepath) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®filepath
- ÷ºÎÆÄÀÏ PathException
public void sendMail(String from, String[] to, String subject, String content, String filepath) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®filepath
- ÷ºÎÆÄÀÏ PathException
public void sendMail(String from, String to, String subject, String content, String[] filepath) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®filepath
- ÷ºÎÆÄÀÏ PathException
public void sendMail(String from, String[] to, String subject, String content, String[] filepath) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®filepath
- ÷ºÎÆÄÀÏ PathException
public void sendMailHtml(String from, String to, String subject, String content) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®(HtmlÇü½Ä)Exception
public void sendMailHtml(String from, String[] to, String subject, String content) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®(HtmlÇü½Ä)Exception
public void sendMailHtml(String from, String to, String subject, String content, String filepath) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®(HtmlÇü½Ä)filepath
- ÷ºÎÆÄÀÏ PathException
public void sendMailHtml(String from, String[] to, String subject, String content, String filepath) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®(HtmlÇü½Ä)filepath
- ÷ºÎÆÄÀÏ PathException
public void sendMailHtml(String from, String to, String subject, String content, String[] filepath) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®(HtmlÇü½Ä)filepath
- ÷ºÎÆÄÀÏ PathException
public void sendMailHtml(String from, String[] to, String subject, String content, String[] filepath) throws Exception
from
- º¸³»´Â »ç¶÷ Mail ÁÖ¼Òto
- ¹Þ´Â »ç¶÷ Mail ÁÖ¼Òsubject
- Á¦¸ñcontent
- º»¹®(HtmlÇü½Ä)filepath
- ÷ºÎÆÄÀÏ PathException
public void setFrom(String from) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setTo(String to) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setTo(String[] to) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setSubject(String subject) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setText(String content) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setTextHtml(String content) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setCc(String cc) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setCc(String[] cc) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setBcc(String bcc) throws javax.mail.MessagingException
javax.mail.MessagingException
public void setBcc(String[] bcc) throws javax.mail.MessagingException
javax.mail.MessagingException
public void addFile(String filepath) throws javax.mail.MessagingException
javax.mail.MessagingException
public void addFiles(String[] filepath) throws javax.mail.MessagingException
javax.mail.MessagingException
Copyright © 2013–2019 POSCO ICT. All rights reserved.