Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 286
  • Last Modified:

Java Applet - Mail

Can we send mail from an Java Applet?
Also can we get the client Browsers default e-mail id?


0
ganeshtnr
Asked:
ganeshtnr
1 Solution
 
muraliramCommented:
Dear ganeshtnr,

          You cannot connect to any other machine in the network except to the one from which the applet is coming. If you still want to open up a connection to other machines you should create signed applet with network permission. Using Java Mail Api you can easily send the mail. For creating signed applets visit

www.ddj.com/articles/1999/9902/9902h/9902h.htm

www.suitable.com/CodeSigningCerts.shtml
www.suitable.com/CodeSigningSignExp.shtml#top
www.suitable.com/CodeSigningSignNav.shtml#top

There is another method. From the applet you can apss all the mail data
to a servlet. From the servlet you can send mail easily without security restrictions. I prefer this. This avoids the downloading of javamailapi to the cleint machine because it is an extension to JDK. This avoids signing applets. Signing an applet means you should get a certificate from a certificate authority. You should pay for this if you want to distribute it over internet. You should get certificate seperately for IE and Netscape. If you are using servlets you can take advantage of the Java Mail Api also.

For getting certificates visit

www.verisign.com/developers/index.html

Information on servlets

java.sun.com/products/servlet
www.servlets.com
www.servletcentral.com

Try

All the best

Murali


0
 
jerchCommented:
I agree with muraliram.  Use servlet in sending mails.
0
 
karthikpCommented:
Hi Ganesh
 this is karthikp
 just visit http://www.ozemail.com.au/~dcrombie/mailform.html
 this will help u to send mail from Javascript itself...
Regards
karthik
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
muraliramCommented:
Dear Karthik,

    gaeshtr wanted to send mail from Java, and your link points to JavaScript.You should not lock the question for an answer that is not related with the topic.Please unlock the question.

Cheers,

Murali
0
 
karthikpCommented:
Dear all,
As murali said I will unlock the question.
But using javascript we can send mails as well as get the client Browsers default e-mail id.
Regards
karthik

0
 
ganeshtnrAuthor Commented:
Dear Muraliram,

Though my question was on Java Applet,  my motive was to send e-mail from client browser.  If it can be achived by JavaScript itself then nothing like it.  The <B>Website</B> suggested by karthik saved the purpose.  I Thank karthik very much for . The signed applet web site is however quite informative and might be helpful in future, thankyou Muraliram for that.  

Bye
Ganesh
0
 
muraliramCommented:
Dear Ganesh,

       It's OK.Ganesh

Murali
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now