Package org.intermine.util
Class MailUtils
- java.lang.Object
-
- org.intermine.util.MailUtils
-
public abstract class MailUtils extends java.lang.Object
Mail utilities for the webapp.- Author:
- Kim Rutherford, Matthew Wakeling
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
email(java.lang.String to, java.lang.String subject, java.lang.String body, java.lang.String from, java.util.Properties webProperties)
Send an email to an address, supplying the recipient, subject and body.static void
email(java.lang.String to, java.lang.String subject, java.lang.String body, java.util.Properties webProperties)
static void
emailPasswordToken(java.lang.String to, java.lang.String url, java.util.Properties webProperties)
Send a password change email to an email addressstatic void
subscribe(java.lang.String email, java.util.Properties webProperties)
Subscribe the given email address to the mailing list specified in the mine config filestatic void
welcome(java.lang.String to, java.util.Properties webProperties)
Send a welcoming email to an email address
-
-
-
Method Detail
-
welcome
public static void welcome(java.lang.String to, java.util.Properties webProperties) throws javax.mail.MessagingException
Send a welcoming email to an email address- Parameters:
to
- the address to send towebProperties
- properties such as the from address- Throws:
javax.mail.MessagingException
- if there is a problem creating the email
-
email
public static void email(java.lang.String to, java.lang.String subject, java.lang.String body, java.lang.String from, java.util.Properties webProperties) throws javax.mail.MessagingException
Send an email to an address, supplying the recipient, subject and body.- Parameters:
to
- the address to send tosubject
- The Subject of the emailbody
- The content of the emailfrom
- the address to send fromwebProperties
- Common properties for all emails (such as from, authentication)- Throws:
javax.mail.MessagingException
- if there is a problem creating the email
-
email
public static void email(java.lang.String to, java.lang.String subject, java.lang.String body, java.util.Properties webProperties) throws javax.mail.MessagingException
- Parameters:
to
- the address to send tosubject
- The Subject of the emailbody
- The content of the emailwebProperties
- Common properties for all emails (such as from, authentication)- Throws:
javax.mail.MessagingException
- if there is a problem creating the email
-
emailPasswordToken
public static void emailPasswordToken(java.lang.String to, java.lang.String url, java.util.Properties webProperties) throws java.lang.Exception
Send a password change email to an email address- Parameters:
to
- the address to send tourl
- the URL to embed in the emailwebProperties
- properties such as the from address- Throws:
java.lang.Exception
- if there is a problem creating the email
-
subscribe
public static void subscribe(java.lang.String email, java.util.Properties webProperties) throws javax.mail.MessagingException
Subscribe the given email address to the mailing list specified in the mine config file- Parameters:
email
- the email to subscribewebProperties
- the web properties- Throws:
javax.mail.MessagingException
- when something goes wrong
-
-