|
|
|
@ -3,6 +3,7 @@ package siprp.medicina.processo.mail;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Properties;
|
|
|
|
import java.util.Properties;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.mail.Address;
|
|
|
|
import javax.mail.Authenticator;
|
|
|
|
import javax.mail.Authenticator;
|
|
|
|
import javax.mail.Message;
|
|
|
|
import javax.mail.Message;
|
|
|
|
import javax.mail.PasswordAuthentication;
|
|
|
|
import javax.mail.PasswordAuthentication;
|
|
|
|
@ -37,6 +38,7 @@ public class MailSender
|
|
|
|
Message msg = new MimeMessage( session );
|
|
|
|
Message msg = new MimeMessage( session );
|
|
|
|
|
|
|
|
|
|
|
|
msg.setFrom( new InternetAddress( from ) );
|
|
|
|
msg.setFrom( new InternetAddress( from ) );
|
|
|
|
|
|
|
|
msg.setReplyTo( new Address[]{ new InternetAddress(from)} );
|
|
|
|
msg.setRecipients( Message.RecipientType.TO, InternetAddress.parse( to, true ) );
|
|
|
|
msg.setRecipients( Message.RecipientType.TO, InternetAddress.parse( to, true ) );
|
|
|
|
msg.setRecipients( Message.RecipientType.BCC, InternetAddress.parse( bcc, true ) );
|
|
|
|
msg.setRecipients( Message.RecipientType.BCC, InternetAddress.parse( bcc, true ) );
|
|
|
|
msg.setSubject( subject );
|
|
|
|
msg.setSubject( subject );
|
|
|
|
|