public abstract class PersonalizedMailMessage
extends java.lang.Object
PersonalizedMailMessage mail = new PersonalizedMailMessage() { public String getOrigin() { return "MyCustomNotification"; } public String getSubject(Member mbr) { return "A personal mail for " + mbr; }; public String getContentText(Member mbr) { return mbr.getFriendlyName() + ",\n\nThis is a personal mail for you...\n"; } }; mail.sendInThread(myMemberSet);
Constructor and Description |
---|
PersonalizedMailMessage() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentHtml(Member mbr)
Returns the HTML content of the mail.
|
java.lang.String |
getContentText(Member mbr)
Returns the text content of the mail.
|
java.lang.String |
getFrom(Member mbr)
Returns the "from" part of the mail.
|
abstract java.lang.String |
getOrigin()
Returns the origin used for the MailMessage.
|
abstract java.lang.String |
getSubject(Member mbr)
Returns the subject of the mail.
|
java.lang.String |
getThread()
Returns the thread name of the MailMessage.
|
boolean |
isRecipient(Member mbr)
Checks if the mail must be sent to the given member.
|
void |
send(java.util.Collection<Member> memberColl)
Sends this mail to a collection of member.
|
void |
send(Member mbr)
Sends this mail to a member.
|
void |
sendInThread(java.util.Collection<Member> memberColl)
Sends this mail to a collection of member in a new thread.
|
public abstract java.lang.String getOrigin()
public abstract java.lang.String getSubject(Member mbr)
mbr
- the memberpublic java.lang.String getContentText(Member mbr)
mbr
- the memberpublic java.lang.String getContentHtml(Member mbr)
mbr
- the memberpublic java.lang.String getFrom(Member mbr)
mbr
- the memberpublic boolean isRecipient(Member mbr)
mbr
- the memberpublic java.lang.String getThread()
public void send(java.util.Collection<Member> memberColl)
memberColl
- a collection of member.public void sendInThread(java.util.Collection<Member> memberColl)
memberColl
- a collection of memberpublic void send(Member mbr)
mbr
- the memberCopyright © 2001-2010 Jalios SA. All Rights Reserved.