Skip to content

Instantly share code, notes, and snippets.

@0xvoila 0xvoila/
Created May 7, 2017

What would you like to do?
public Class MailConfiguration{
public static String userName;
public static String password;
public static String emailService;
public Class MailInit{
public void initialConfiguration(String userName, String password, String emailService ){
MailConfiguration.userName = userName;
MailConfiguration.password = password;
MailConfiguration.emailService = emailService;
public Class Mail{
public void sendEmail(String recipient, String subject, String messageBody){
if (MailConfiguration.emailServiceProvider == "google"){
GMailLowLevelClass gmailLowLevelObject = new GMailLowLevelClass();
gmailLowLevelObject.connect(MailConfiguration.userName, MailConfiguration.password)
gmailLowLevelObject.send(receipient, subject, messageBody);
else (MailConfiguration.emailServiceProvider == "yahoo"){
yahooLowLevelClass yahooLowLevelObject = new yahooLowLevelClass();
yahooLowLevelObject.connect(MailConfiguration.userName, MailConfiguration.password)
yahooLowLevelObject.send(receipient, subject, messageBody);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.