• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubt on sending email from servlet!

 
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

I have doubt regarding sending an email from
a servlet ,i want to know about the requirements
on sending email from Servlet using local host
i have Tomcat Server on my pc i am taking user input in my jsp page
getting fields like From ,To,Subject,Message and
from jsp i am calling my Servlet and passing
all these parameters,in my Servlet i am accessing
JavaMail Api ie mailapi.jar which consist of classes
for sending email and also i am using
JavaBeans Activation Framework which consist of
activation.jar

but still i am getting exception
as below




i wanted to know if any more files are required
in order to send an email...or i am going wrong
somewhere ...any help or information on above will be realy great

thanks in advance
Dhwani:>Winning is not important but it is the only thing.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have mail.jar in your app?
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These links would help:

Sun's JavaMail API Home Page:
http://java.sun.com/products/javamail/index.jsp

Sun's FAQ (very good):
http://java.sun.com/products/javamail/FAQ.html#getJM

Download JavaMail API 1.4.1:
http://java.sun.com/products/javamail/downloads/index.html

GlassFish Project Community JavaMail Home Page:
https://glassfish.dev.java.net/javaee5/mail/
 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

Yes i have mail.jar in my app and my servlet
compiles fine as well,
and i am using (Java Mail API )...(From which i am accessing mail.jar,smtp.jar)
and JAF (JavaBeans Activation Framework)...(From which i am accessing Activation.jar)......
but the main problem i came to know

about is i will require mail server the most important one which i
missed out..

I wanted to know Is it possible to get a free mail server on my
local pc ?so that this appilcation could work


actualy i went through some tutorials so i came
to know that i can use postcastserver(ie mail server) available for freea trial version
on my local pc so as to work out this appilcation....
from this link mail server as trial version for free

But i am in doubt on to how to utilize it after installing
it on my pc.............in my servlet
i am using


(what changes i must make here in arguments after i install
postcastserver?)


any help or information on the above will
be realy great ...........till then i will keep trying......

Thanks in advance
Dhwani>Winning is not important but it is the only thing.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can use you gmail account and send mails using your login and password details. but beware of the proxy, if you have one then you need to include that also in the properties.

mail.google.com
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by dhwani mathur:

I wanted to know Is it possible to get a free mail server on my
local pc ?so that this appilcation could work



Yes.
The two that come to mind are SendMail if you're on Unix.
This is probably the most used mail server on the internet.
It's very powerful and configurable but not all that user friendly.
Learning to configure it is like learning another language.
Fortunately, people have written applications that can be used to help you write to sendmail.conf.

If you're app is on a Windows machine, IIS has a pretty simple STMP server that can be used for this.

One warning if you go with either of these approaches.
Within the last year or two the folks who host the POP server to which you'll be sending have really started tightening up their policies.
Most will not accept mail from any domain that isn't registered.
If this is for a real production app, you might consider registering a domain and hosting with a provider that will let you relay from one of their machines.

This is becoming more about mail than servlets so I'm going to move it to our Other Java APIs forum where JavaMail is normally discussed.
 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi thr......

Thanks a lot Ben Souther for your response
on getting a free mail server and proceeding .....
i am still on my way trying to work it
out .......will come back as i get it done.


Dhwani:>Winning is not important but it is the only thing.
reply
    Bookmark Topic Watch Topic
  • New Topic