This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Sending E-Mail through an Applet                                    " Watch "Sending E-Mail through an Applet                                    " New topic
Author

Sending E-Mail through an Applet

Vijayan Pandalai
Greenhorn

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
regards
vijayan.
Praveen Singh
Greenhorn

Joined: Aug 18, 2001
Posts: 14
Hi,
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
 
 
subject: Sending E-Mail through an Applet
 
Similar Threads
Using JDBC.ODBC Driver with an applet
java mail response code
Error with running batch file from Java class
Assignment Java-5 (Times)
URL Link