Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with Send Email on submit

 
Fun Learning
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I have a web page which has two selectone menus. They both are desgined to get populated with the same data, but the user has to select two different values for the two menus, and when he clicks submit, an email should be sent to both the values selected. For example, I have the following two menus.

<h:selectOneMenu id="advisorId" value="#{AdvisorChangeBean.advisorId}" onchange="this.form.submit()">
<f:selectItem itemLabel="Select your current advisor" itemValue="0" />
<f:selectItems value="#{AdvisorChangeBean.advisorslist}" />
</h:selectOneMenu>


<h:selectOneMenu id="advisorId1" value="#{AdvisorChangeBean.advisorId1}" onchange="this.form.submit()">
<f:selectItem itemLabel="Select your new advisor" itemValue="0" />
<f:selectItems value="#{AdvisorChangeBean.advisorslist}" />
</h:selectOneMenu>

[/CODE]

I want to send an email to both advisorId and advisorId1 on clicking a submit button. I am using JSF along with Hibernate and Spring.

Can anyone please suggest me how to do this?

Thank you,
Lavanya.
 
Joe Matthew
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not understand the question. Are you looking for a API to help you send a mail? If so, many APIs are available like JavaMail etc.
 
Fun Learning
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, am not looking for APIs. I was looking for help to send email to two different email ids based on the user selection in the two menus. The two menus have the same list of values, but the user has to select different values in the two menus. The drop down menus are getting populated from the database table which has column fields as id, firstname, lastname, email. An email should be sent to the email ids based upon the selection of values in the drop down menu. I was not able to do this. It would be great if anyone would suggest any idea to do this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic