package fr.sii.notification.sample.standard;

import java.util.Properties;

import fr.sii.notification.core.builder.NotificationBuilder;
import fr.sii.notification.core.exception.NotificationException;
import fr.sii.notification.core.service.NotificationService;
import fr.sii.notification.email.message.Email;

public class BasicGmailTLSSample {

	public static void main(String[] args) throws NotificationException {
		// configure properties (could be stored in a properties file or defined
		// in System properties)
		Properties properties = new Properties();
		properties.put("mail.smtp.auth", "true");
		properties.put("mail.smtp.starttls.enable", "true");
		properties.put("mail.smtp.host", "smtp.gmail.com");
		properties.put("mail.smtp.port", "587");
		properties.put("mail.smtp.user", "aurelien.baudet");
		properties.put("mail.smtp.password", "0r3li1!?B");
		properties.put("mail.debug", "true");
		properties.put("notification.email.authenticator.username", "aurelien.baudet");
		properties.put("notification.email.authenticator.password", "0r3li1!?B");
		properties.put("notification.email.from", "aurelien.baudet@gmail.com");
		properties.put("http.proxyHost", "192.168.56.1");
		properties.put("http.proxyPort", "8888");
		// Instantiate the notification service using default behavior and
		// provided properties
		NotificationService service = new NotificationBuilder().useAllDefaults(properties).build();
		service.send(new Email("subject", "email content", "aurelien.baudet@gmail.com"));
	}

}

@@ -786,39 +786,45 @@
 mtp.user%22, %22
-aurelien.baudet
+%3Cyour gmail username%3E
 %22);%0A%09%09proper
@@ -859,57 +859,29 @@
 %22, %22
-0r3li1!?B%22);%0A%09%09properties.put(%22mail.debug%22, %22true
+%3Cyour gmail password%3E
 %22);%0A
@@ -943,31 +943,37 @@
 name%22, %22
-aurelien.baudet
+%3Cyour gmail username%3E
 %22);%0A%09%09pr
@@ -1035,17 +1035,29 @@
 %22, %22
-0r3li1!?B
+%3Cyour gmail password%3E
 %22);%0A
@@ -1105,129 +1105,28 @@
 %22, %22
-aurelien.baudet@gmail.com%22);%0A%09%09properties.put(%22http.proxyHost%22, %22192.168.56.1%22);%0A%09%09properties.put(%22http.proxyPort%22, %228888
+%3Cyour gmail address%3E
 %22);%0A
@@ -1371,33 +1371,27 @@
 %22, %22
-aurelien.baudet@gmail.com
+%3Crecipient address%3E
 %22));

Update samples