Sup fellas...another question..how Can I pass my jsp as the contents of a email message.

The way we send email around here is we set the parameters of a form into a DB table and a cron job sends the emails out

String address= "suggestaservice@agentadvantage.com"        String name = request.getParameter("name");
	String accountName = userData.getAcctName();
	String email = request.getParameter("email");
	String description = request.getParameter("description");
	String benefit = request.getParameter("benefit");
   
	
	//This is the body of the email
	String message = "Enhancement suggestion from:" + "\n\n";
	message += "Name: " + name + "\n";
	message += "Email: " + email + "\n";
	message += "Account: " + username + "\n\n";
	message += "Description: " + description + "\n\n";
    message += "Benefit: " + benefit;
	
   OutgoingMessage msg = new OutgoingMessage();
   msg.setFromAddr(email);
   msg.setFromName(name);
   msg.setToAddr(address);
   msg.setSubject("Preferred Pages Enhancement Suggestion");
   msg.setContent(message);
   msg.send();

any suggestions on how to set a whole form as the "message"

thanx

Recommended Answers

All 2 Replies

mimsc,
>how Can I pass my jsp as the contents of a email?

Yes, after all jsp page is also a text file. Attachment of jsp page or assign the content of jsp to message body.

attachment to message body? ...a little confused as to how to do that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.