Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending email order confirmationa  RSS feed

 
james deniels
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats the easiest way to send an email to a user showing them the items they have purchased. I have used the this code:
String subject = "Thank you";
// String subject = request.getParameter("subject");
message.setSubject(subject);
String text = "Thank you, " + request.getParameter("name") + ", for your purchase";
String regard = "Best Regards,";

But the String subject needs to somehow reference the items that are in the shopping cart..How can this be done.
 
Sarath Mohan
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
You didn't specify the where you are using this code segment.
You can pass list of item names from the shopping cart object (String array) to this part of code and set this String as message body of the mail object.
Cheers
Bin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!