public class Mail extends Object
Constructor and Description |
---|
Mail(String from,
String to,
String subject,
String messageBody) |
Modifier and Type | Method and Description |
---|---|
void |
addAttachement(String attachement) |
String |
getRecipient() |
void |
send(String mailServer)
Sends the represented message through the given custom mail-server.
|
void |
sendThroughGmail(String gmailAddress,
String gmailPassword)
Sends the represented message through Gmail SMTP server using the given
Gmail account credentials.
|
public String getRecipient()
public void addAttachement(String attachement)
attachement
- public void send(String mailServer) throws javax.mail.internet.AddressException, javax.mail.MessagingException
javax.mail.MessagingException
javax.mail.internet.AddressException
public void sendThroughGmail(String gmailAddress, String gmailPassword) throws javax.mail.MessagingException
gmailAddress
- gmailPassword
- javax.mail.MessagingException
Copyright © 2013. All Rights Reserved.