|
|
|
|
@ -14261,6 +14261,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
|
|
|
|
|
|
|
|
|
|
// private final String mail_bcc = "departamentotecnico@siprp.pt";
|
|
|
|
|
private final String mail_bcc = "acidentes.auchan@siprp.pt";
|
|
|
|
|
private final String mail_bcc2 = "siprp.aat@evolute.pt";
|
|
|
|
|
|
|
|
|
|
public class SMTPAuthenticator extends Authenticator {
|
|
|
|
|
public PasswordAuthentication getPasswordAuthentication() {
|
|
|
|
|
@ -14284,8 +14285,12 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
|
|
|
|
|
msg.setFrom(new InternetAddress(emailFrom));
|
|
|
|
|
InternetAddress[] address = {new InternetAddress(emailTo)};
|
|
|
|
|
msg.setRecipients(Message.RecipientType.TO, address);
|
|
|
|
|
InternetAddress[] addressBCC = {new InternetAddress( mail_bcc )};
|
|
|
|
|
msg.setRecipients(Message.RecipientType.BCC, addressBCC );
|
|
|
|
|
|
|
|
|
|
InternetAddress[] addressBCC = new InternetAddress[ 2 ];
|
|
|
|
|
addressBCC[ 0 ] = new InternetAddress( mail_bcc );
|
|
|
|
|
addressBCC[ 1 ] = new InternetAddress( mail_bcc2 );
|
|
|
|
|
msg.setRecipients( Message.RecipientType.BCC, addressBCC );
|
|
|
|
|
|
|
|
|
|
((MimeMessage)msg).setSubject(assunto, "UTF-8");
|
|
|
|
|
msg.setSentDate(new Date());
|
|
|
|
|
Multipart multipart = new MimeMultipart();
|
|
|
|
|
|