1 16 package org.apache.cocoon.mail; 17 18 import org.apache.cocoon.environment.SourceResolver; 19 import javax.mail.MessagingException ; 20 import javax.mail.internet.AddressException ; 21 22 30 public interface MailSender { 31 32 String ROLE = MailSender.class.getName(); 33 34 38 41 void setSmtpHost(String hostname); 42 43 46 public void setSmtpHost(String hostname, String username, String password); 47 48 52 56 void setFrom(String from); 57 58 66 void setTo(String to); 67 68 76 void setReplyTo(String replyTo); 77 78 86 void setCc(String cc); 87 88 96 void setBcc(String bcc); 97 98 103 void setCharset(String charset); 104 105 109 void setSubject(String subject); 110 111 117 void setBody(String body); 118 119 125 void setBodyFromSrc(String src); 126 127 131 void setBodyFromSrcMimeType(String srcMimeType); 132 133 141 void addAttachment(Object attachment); 142 143 153 void addAttachment(Object attachment, String type, String name); 154 155 163 void addAttachmentURL(String url); 164 165 175 void addAttachmentURL(String url, String type, String name); 176 177 181 187 void send() 188 throws AddressException , MessagingException ; 189 190 196 void send(SourceResolver resolver) 197 throws AddressException , MessagingException ; 198 199 205 boolean sendIt(); 206 207 213 boolean sendIt(SourceResolver resolver); 214 215 219 Exception getException(); 220 } 221 | Popular Tags |