Package de.oberdorf_itc.sendmail
Class Sendmail
- java.lang.Object
-
- de.oberdorf_itc.sendmail.Sendmail
-
- All Implemented Interfaces:
Runnable
public class Sendmail extends Object implements Runnable
Class Sendmail - to encapsulate mail sending class as runable thread Copyright by Michael Oberdorf IT-Consulting 2015,
Date: 2016-07-20- Version:
- 0.200
- Author:
- Michael Oberdorf
- See Also:
- "http://www.oberdorf-itc.de/", "https://www.tutorials.de/threads/email-mit-javamail-versenden.255387/"
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()run - overwrites the run method to start the tread in background to send the mail
-
-
-
Constructor Detail
-
Sendmail
public Sendmail(String smtpHost, String user, String pass, String senderAddress, String recipientsAddress, String subject, String body) throws javax.mail.internet.AddressException, javax.mail.MessagingException
Sendmail constructor- Parameters:
smtpHost- (String: smtp mail host)user- (String: user name for smtp authentication)pass- (String: password for smtp authentication)senderAddress- (String: the from address)recipientsAddress- (String: the recipients address)subject- (String: the mails subject line)body- (String: the mail body ontent)- Throws:
javax.mail.MessagingException- if the properties can't be setjavax.mail.internet.AddressException- if the mailaddress is rfc822 complient
-
-