01: package com.technoetic.xplanner.mail;
02:
03: import javax.mail.MessagingException;
04: import javax.mail.internet.AddressException;
05: import java.io.File;
06: import java.io.PrintWriter;
07: import java.util.Date;
08:
09: import org.springframework.orm.hibernate.HibernateOperations;
10:
11: import com.technoetic.xplanner.domain.repository.ObjectRepository;
12:
13: public interface EmailMessage {
14: void setFrom(String from) throws AddressException,
15: MessagingException;
16:
17: void setRecipients(String recipients) throws AddressException,
18: MessagingException;
19:
20: void setRecipients(String[] recipients) throws AddressException,
21: MessagingException;
22:
23: void setBody(String body) throws MessagingException;
24:
25: PrintWriter getBodyWriter();
26:
27: void setSubject(String subject) throws MessagingException;
28:
29: void setSentDate(Date sentDate) throws MessagingException;
30:
31: void addAttachment(String filename) throws MessagingException;
32:
33: void addAttachment(String filename, File file)
34: throws MessagingException;
35:
36: void send() throws MessagingException;
37:
38: void setCcRecipients(String recipients) throws MessagingException,
39: AddressException;
40:
41: void setRecipient(int personId) throws MessagingException;
42:
43: void setObjectRepository(ObjectRepository objectRepository);
44: }
|