|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.messaging.Mail
public class Mail
| Constructor Summary | |
|---|---|
Mail()
|
|
| Method Summary | |
|---|---|
static String |
getDomainPart(String address)
This extracts the mail domain from the address. |
static String |
getLocalPart(String address)
Extracts the local-part specification out of an eMail address, removing any comment strings, and returns something like what people naïvely assume is a valid eMail address. |
static boolean |
isValidMail(String address)
Determine whether an eMail address might be valid. |
static String |
readTemplate(String templateName)
Reads in a template file from the appropriate folder |
static void |
sendBugReport(String subject,
String message)
Send a bug report via email. |
static void |
sendChildSignupMail(User kid)
Send an eMail notification to a parent, advising them that their child has signed up, and requesting authorization. |
static void |
sendPasswordRecoveryMail(Person user)
Send a user's or parent's password out, after they have successfully completed the forgotten password recovery question. |
static void |
sendPremiumMail(User user)
This method is called when a member has signed up to be a VIT (Very Important Toot) member. |
static void |
sendSignupMail(Person user)
Update the email address for the user and then send an enrollment email to the address. |
static void |
sendStaffPaswordResetMail(Person person)
FIXME: Don't know why this would be sent. |
static void |
sendTemplateMail(Person user,
String templateName,
boolean isChildNotification,
String subject)
|
static void |
validateMail(String address)
Forbids recently-bounced addresses from being used as well. |
static void |
validateMXDomain(String domainName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Mail()
| Method Detail |
|---|
public static String getDomainPart(String address)
throws DataException
address - An eMail address in RFC-2822 format
DataException - if the domain-part can't be found, doesn't
conform to DNS requirements for a domain string, or the
address doesn't have an @ sign to declare a domain part
at all.
public static String getLocalPart(String address)
throws DataException
address - An eMail address string
DataException - if the address does not conform to RFC-822
requirementspublic static boolean isValidMail(String address)
address - eMail address string
public static String readTemplate(String templateName)
throws FileNotFoundException,
IOException,
NotFoundException
templateName - the template file
FileNotFoundException - If the template file can't be found
IOException - If the template file can't be read
NotFoundException - If the name of the template file can't
be found in AppiusConfig
public static void sendBugReport(String subject,
String message)
subject - The subject of the mail messagemessage - The stack trace and associated details involved.
public static void sendChildSignupMail(User kid)
throws FileNotFoundException,
IOException,
NotFoundException,
DataException,
NamingException
kid - WRITEME
FileNotFoundException - WRITEME
IOException - WRITEME
NotFoundException - WRITEME
DataException - WRITEME
NamingException - WRITEME
public static void sendPasswordRecoveryMail(Person user)
throws FileNotFoundException,
IOException,
NotFoundException
user - The user who forgot his/her password
NotFoundException - ?? WRITEME
IOException - if the template can't be read
FileNotFoundException - if the template isn't found
public static void sendPremiumMail(User user)
throws FileNotFoundException,
IOException,
NotFoundException,
DataException,
NamingException
This method is called when a member has signed up to be a VIT (Very Important Toot) member.
Update the email address for the user and then send an enrollment email to the address.
user - User name that should be updated.
IOException - if the template can't be read or something
similar
FileNotFoundException - if the template file is missing
NotFoundException - if the template file is not found
NamingException - if the eMail address is invalid
DataException - if something else bad happens
public static void sendSignupMail(Person user)
throws FileNotFoundException,
IOException,
NotFoundException,
DataException,
NamingException
user - User name that should be updated.
IOException - if the template can't be read or something
similar
FileNotFoundException - if the template file is missing
NotFoundException - if the template file is not found
NamingException - if the eMail address is invalid
DataException - if something else bad happens
public static void sendStaffPaswordResetMail(Person person)
throws FileNotFoundException,
IOException,
NotFoundException
person - WRITEME
FileNotFoundException - WRITEME
IOException - WRITEME
NotFoundException - WRITEME
public static void sendTemplateMail(Person user,
String templateName,
boolean isChildNotification,
String subject)
throws FileNotFoundException,
IOException,
NotFoundException,
javax.mail.MessagingException
user - The user to whom the mail should be sent (or, the
user's parent, if selected)templateName - The name of the mail message template fileisChildNotification - WRITEMEsubject - The subject to apply to the eMail.
FileNotFoundException - if the template is not found
IOException - failure reading template
NotFoundException - ... WRITEME?
javax.mail.MessagingException - WRITEME
public static void validateMail(String address)
throws DataException,
NamingException
address - Any RFC-2822-valid eMail address string
DataException - if the address isn't appropriate somehow
(e.g. bad format)
NamingException - if the JNDI DNS provider fails (bubble
up)BadMailList
public static void validateMXDomain(String domainName)
throws NamingException,
DataException
domainName - the domain name for which we're looking for a
mail exchanger
NamingException - if the JNDI provider fails
DataException - if the domain does not have an MX record in
DNS
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||