wood burning stoves
The moose likes Other JSE/JEE APIs and the fly likes Sending E-Mail through an Applet                                    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 E-Mail through an Applet                                    " Watch "Sending E-Mail through an Applet                                    " New topic

Sending E-Mail through an Applet

Vijayan Pandalai

Joined: Sep 02, 2001
Posts: 1
Hi All, I have been trying to send an E-Mail through an applet for quite sometime now but haven't been quite successful. I have downloaded and tested quite a bit of code but none of them have worked successfully. I have been getting an "Unable to connect to host exception". Using the same code as an application however, the mail is sent successfully. Where am i going wrong? What is the solution? I am working on an urgent project, any solution at the earliest would be highly appreciated.
Thanks is advance
Praveen Singh

Joined: Aug 18, 2001
Posts: 14
An applet can never connect to a machine other than from which it is loaded.So in your case while sending the mail, it tres to connect to the mail host, and gives the exception. I suggest you to send the request to servlet through your appplet and your servlet should send the email to the mail host.

IBM Certified WebSphere Application Server System Admin<br />IBM Certified WebSphere Portal Server System Admin
I agree. Here's the link: http://aspose.com/file-tools
subject: Sending E-Mail through an Applet
jQuery in Action, 3rd edition