com.ferri.portlet.utils
Class MailUtils

java.lang.Object
  extended by com.ferri.portlet.utils.MailUtils

public class MailUtils
extends Object

Calsse on deleguen les utilitats de mailing.

Author:
dferri

Nested Class Summary
(package private) static class MailUtils.HTMLDataSource
           
 
Field Summary
private  String hashcode
           
private  String userAccount
           
 
Constructor Summary
MailUtils(String userAccount, String hashcode)
          Creacio MailUtils
 
Method Summary
 boolean envioMail(String from, String[] to, String subject, String body, File attachment)
          Envia un mail amb una compte gmail preconfigurat
 String getHashcode()
           
 String getUserAccount()
           
 void setHashcode(String hashcode)
           
 void setUserAccount(String userAccount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userAccount

private String userAccount

hashcode

private String hashcode
Constructor Detail

MailUtils

public MailUtils(String userAccount,
                 String hashcode)
Creacio MailUtils

Parameters:
userAccount -
hashcode -
Method Detail

envioMail

public boolean envioMail(String from,
                         String[] to,
                         String subject,
                         String body,
                         File attachment)
Envia un mail amb una compte gmail preconfigurat

Parameters:
from - String
to - String[]
subject - String
body - String amb format html
attachment - File
Returns:
boolean resultat

getUserAccount

public String getUserAccount()
Returns:
the userAccount

setUserAccount

public void setUserAccount(String userAccount)
Parameters:
userAccount - the userAccount to set

getHashcode

public String getHashcode()
Returns:
the hashcode

setHashcode

public void setHashcode(String hashcode)
Parameters:
hashcode - the hashcode to set