This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes how to send an email in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "how to send an email in jsp" Watch "how to send an email in jsp" New topic
Author

how to send an email in jsp

firstName SecondName
Greenhorn

Joined: Mar 20, 2009
Posts: 15
i am developing an application in j2me and i want send email.
i need suggestions about sending email through servlets.
Ananth Chellathurai
Ranch Hand

Joined: Nov 21, 2007
Posts: 349

What have you tried so far?


Ananth Chellathurai [Walk on software]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61105
    
  66

Your subject says JSP, but your message says servlets. Which is it?

In any case, the answer is neither. Mails is sent with the JavaMail API. I've moved this post accordingly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
firstName SecondName
Greenhorn

Joined: Mar 20, 2009
Posts: 15
Ananth Chellathurai wrote:What have you tried so far?

I got code from internet which is sending email and its called servlets because i am j2me programmer and never did any thing in jsp or servlets so this is my first time i need to do something in jsp side.
we can't send an email in j2me ,either we need to use that mobile api or we need to use SMTP .
I want to use smtp server one.
suggestions please!
thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41631
    
  55
The http://faq.javaranch.com/java/JavaEnterpriseEditionFaq points to much useful information about JavaMail, including an introduction and an extensive tutorial with many code examples. Note that something like this should never be done in a JSP; use a servlet instead.


Ping & DNS - my free Android networking tools app
Frank Eichfelder
Ranch Hand

Joined: Aug 25, 2003
Posts: 33
If you really want to send a mail in a j2me-application, you can find a good introduction here.
But I still don't understand why you ask for jsp and servlets in the context of j2me. This only makes sense, when your j2me-application doesn't send the mail itself but calls a servlet which sends a mail via JavaMail. If this is the case, you really should consult the documentation Ulf mentioned.
 
Consider Paul's rocket mass heater.
 
subject: how to send an email in jsp