Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Creative commons Attribution-NonCommercial license. http://creativecommons.org/licenses/by-nc/2.5/au/deed.en_GB NO WARRANTY IS GIVEN OR IMPLIED, USE AT YOUR OWN RISK.
 
 package base.email;
 
Holds contents of an email message.
public class EmailMessage {
	private String from = "";
	private String to = "";
	private String content = "";
	private String subject = "";

Creates a new instance of EmailMessage
	public EmailMessage() {
	}
	public void setFrom(String email) {
		 = email;
	}
	public String getFrom() {
		return ;
	}
	public void setSubject(String s) {
		 = s;
	}
	public String getSubject() {
		return ;
	}
	public void setTo(String email) {
		 = email;
	}
	public String getTo() {
		return ;
	}
	public void setBody(String body) {
		 = body;
	}
	private static final Pattern HEADER_MATCH = Pattern.compile("([a-zA-Z\\-]+):[ \\t]*(.*)");
	public void setHeaders(String headers) {
		String[] t = headers.split("[\n\r]");
		for(int x = 0; x < t.lengthx++) {
			if(m.matches()) {
				if(m.group(1).equalsIgnoreCase("From")) {
				}
				if(m.group(1).equalsIgnoreCase("To")) {
					setTo(m.group(2));
				}
				if(m.group(1).equalsIgnoreCase("Subject")) {
				}
			}
		}
	}
	public String getBody() {
		return ;
	}
New to GrepCode? Check out our FAQ X