fitgoodies-mail/src/main/java/de/cologneintelligence/fitgoodies/mail/SetupHelper.java
public Properties generateProperties() {
		Properties result = new Properties();

		if (proto == null) {
			throw new RuntimeException("no protocol selected");
		}

		String protocol = proto.toLowerCase();

		setProperty(result, "mail.store.protocol", protocol);
		setProperty(result, "mail." + protocol + ".host", host);
		setProperty(result, "mail.username", user);
		setProperty(result, "mail.password", pass);

		if (port != 0) {
			setProperty(result, "mail." + protocol + ".port", Integer.toString(port));
		}

		if (ssl) {
			setProperty(result, "mail." + protocol + ".ssl", "true");
		}

		if (protocol.equals("pop3")) {
			setProperty(result, "mail.inbox", "INBOX");
		} else {
			if (inbox == null) {
				throw new RuntimeException("no inbox selected");
			}

			setProperty(result, "mail.inbox", inbox);
		}

		return result;
	}
public Properties generateProperties() {
		Properties result = new Properties();

		if (proto == null) {
			throw new RuntimeException("no protocol selected");
		}

		String protocol = proto.toLowerCase();

		setProperty(result, "mail.store.protocol", protocol);
		setProperty(result, "mail." + protocol + ".host", host);
		setProperty(result, "mail.username", user);
		setProperty(result, "mail.password", pass);

		if (port != 0) {
			setProperty(result, "mail." + protocol + ".port", Integer.toString(port));
		}

		if (ssl) {
			setProperty(result, "mail." + protocol + ".ssl", "true");
		}

		if (protocol.equals("pop3")) {
			setProperty(result, "mail.inbox", "INBOX");
		} else {
			if (inbox == null) {
				throw new RuntimeException("no inbox selected");
			}

			setProperty(result, "mail.inbox", inbox);
		}

		return result;
	}
public Properties generateProperties ( ) { Properties result = new Properties ( ) ; if ( proto == null ) { throw new RuntimeException ( "no protocol selected" ) ; } String protocol = proto . toLowerCase ( ) ; setProperty ( result , "mail.store.protocol" , protocol ) ; setProperty ( result , "mail." + protocol + ".host" , host ) ; setProperty ( result , "mail.username" , user ) ; setProperty ( result , "mail.password" , pass ) ; if ( port != 0 ) { setProperty ( result , "mail." + protocol + ".port" , Integer . toString ( port ) ) ; } if ( ssl ) { setProperty ( result , "mail." + protocol + ".ssl" , "true" ) ; } if ( protocol . equals ( "pop3" ) ) { setProperty ( result , "mail.inbox" , "INBOX" ) ; } else { if ( inbox == null ) { throw new RuntimeException ( "no inbox selected" ) ; } setProperty ( result , "mail.inbox" , inbox ) ; } return result ; }
Generates a properties object which can be used by
{@link de.cologneintelligence.fitgoodies.mail.providers.JavaMailMessageProvider}.
Default values are not set.

@return properties object
Generates a properties object which can be used by { @link de . cologneintelligence . fitgoodies . mail . providers . JavaMailMessageProvider } . Default values are not set .