File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Help with Send Email on submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Help with Send Email on submit" Watch "Help with Send Email on submit" New topic
Author

Help with Send Email on submit

Fun Learning
Greenhorn

Joined: Jun 25, 2008
Posts: 3
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

Joined: Jun 10, 2008
Posts: 66
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.


Regards,<br />Joe<br /> <br />"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."<br />--Martin Golding
Fun Learning
Greenhorn

Joined: Jun 25, 2008
Posts: 3
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with Send Email on submit