hassan ali wrote:hi
i have Manged bean to send Email using javaMail API , test separate successfully , in jsf i set button properties as follow h:commandButton action="Mail.send" where Mail is manged bean .
but it does not work why?
Do you have a pre-sales question, need help with selecting the right price plan, or just want to drop us a note? Simply fill out this form, and we'll respond promptly. All e-mail inquiries receive replies within twenty-four hours, although in most cases, only minutes.
If you are interested in our discount coupon, leave us a message with your email address, and we will respond with the code.
<strong class="style2">Name:</strong> | <label> <h:inputText required="true" value="#{mail.name}" /> </label> | |
<strong class="style2">Email:</strong> | <label> <h:inputText autocomplete="on" required="true" value="#{mail.email}" /> </label> | |
<strong class="style2">Subject:</strong> | <label> <h:inputText required="true" value="#{mail.subject}" /> </label> | |
<strong>Detailed description of your question:</strong> Please describe your question in as much detail as you can. The more information you can provide us with, the better equipped we will be to help you, quickly and efficiently | ||
<h:inputTextarea rows="10" cols="40" required="true" value="#{mail.sms}"></h:inputTextarea> | ||
<label> <h:commandButton type="submit" action="#{mail.send}" /> </label> |
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
hassan ali wrote:ok thanks
this my bean
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.NoSuchProviderException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
......
</h:form>
</ui:composition>
This and everything after will be ignored
</body>
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |