1 17 18 package org.apache.mailet; 19 20 import java.util.Collection ; 21 import java.util.Iterator ; 22 23 import javax.mail.MessagingException ; 24 import javax.mail.internet.MimeMessage ; 25 26 37 public interface MailetContext { 38 39 48 void bounce(Mail mail, String message) throws MessagingException ; 49 50 58 void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException ; 59 60 69 Collection getMailServers(String host); 70 71 76 MailAddress getPostmaster(); 77 78 93 Object getAttribute(String name); 94 95 102 Iterator getAttributeNames(); 103 104 111 int getMajorVersion(); 112 113 120 int getMinorVersion(); 121 122 134 String getServerInfo(); 135 136 142 boolean isLocalServer(String serverName); 143 144 150 boolean isLocalUser(String userAccount); 151 152 159 void log(String message); 160 161 168 void log(String message, Throwable t); 169 170 177 void removeAttribute(String name); 178 179 187 void sendMail(MimeMessage msg) 188 throws MessagingException ; 189 190 199 void sendMail(MailAddress sender, Collection recipients, MimeMessage msg) 200 throws MessagingException ; 201 202 213 void sendMail(MailAddress sender, Collection recipients, MimeMessage msg, String state) 214 throws MessagingException ; 215 216 224 void sendMail(Mail mail) 225 throws MessagingException ; 226 227 238 void setAttribute(String name, Object object); 239 240 251 void storeMail(MailAddress sender, MailAddress recipient, MimeMessage msg) 252 throws MessagingException ; 253 254 267 Iterator getSMTPHostAddresses(String domainName); 268 } 269 | Popular Tags |