File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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

how to send an email in jsp

firstName SecondName

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

Joined: Jan 10, 2002
Posts: 63873

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] [About Bear] [Books by Bear]
firstName SecondName

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!
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The 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.
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.
I agree. Here's the link:
subject: how to send an email in jsp
It's not a secret anymore!