File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes sending email using JavaMail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "sending email using JavaMail" Watch "sending email using JavaMail" New topic
Author

sending email using JavaMail

Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

Hi friends,

I am having a Query,I want to make a feedback form like one on contact us page.
Where visitors can submit the feedback
by entering their information.

Like:-
Your name ABC
Your email ABC@gmail.com
Your comments This website is best

and the mail will be delivered to my mail id.
say "XYZ@gmail.com"

I want to implement this,Could you please provide me some insight regarding this..

I am having some clue that this will be implemented using JavaMail,and also got to know the tutorial.
http://www.javacommerce.com/displaypage.jsp?name=javamail.sql&id=18274

Can anybody help me with few Queries.
1.What is this "smtp.jcom.net" in above tutorial.
Whether <smtp.jcom.net> will be provided by the website hosting service.
2.Is this straight forward like i will call this method by place a jars in classpath and it will work or there is need to
do some configuration setting
3.I need to deploy my application on Tomcat server.Could you please provide me some good webhosting agencies for that
and if their is some webhosting agency where Java application can be deployed easily then it will be higly appreciated.


Thanks
Shanky


SCJP6.0,My blog Ranchers from Delhi
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42944
    
  68
#1: That's the mail server address. Your hosting company possibly provides one, check the details of your hosting plan.

#2: It could be as simple as that. Note that the code you linked do does not perform authentication, which most mail servers require these days. The JavaEnterpriseEditionFaq points to an extensive JavaMail tutorial that shows how to do that.

#3: The ServletsFaq has a list of Java hosting companies. Make sure to check the features of whichever plan you intend to sign up for to make sure it has all the features you need.
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

Hi,

There are so many web hosting servicies are there.
Could you please suggest me some.I dont want to repent later on,and less interested to change my Hosting agency later.
And some more Queries Please

1.Whether i have to place the complete jar files on the server or server will have them.
2.Whether tomcat server need to be bundled with my jar files.

I am ready to spent max of 2000/-per month.Is it possible to have good hosting for me in this price..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42944
    
  68
There are so many web hosting servicies are there. Could you please suggest me some.

It would be inappropriate to recommend one, since we don't know your requirements. But you can easily compare them yourself, since all have detailed descriptions of features and plans on their web sites. Decent hosting starts at about 15 USD per month.

Whether i have to place the complete jar files on the server or server will have them.

That is trivial to find out once you have signed up for one, and makes no real difference one way or the other to begin with, so it's not worth wondering about now.

Whether tomcat server need to be bundled with my jar files.

I'm not sure how you propose to "bundle" Tomcat with your jar files, but in the price range you have in mind most hosting companies will not let you install servers anyway; so it'll be preinstalled.
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

Hi
i am facing the problem while sending email.

Can anybody please help me with this error



for...
java.lang.NoClassDefFoundError: javax/mail/MessagingException


i have already added mail.jar in the classpath but still facing the above probelm......

my classpath includes.
jdk1.5.0_12
mailapi.jar
pop3.jar
smtp.jar
activation.jar
mail.jar



Thanks
Shanky
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

The above problem is solved by placing a jar file in the myapps/web-inf/lib folder...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sending email using JavaMail