Close
jGuru Forums
Posted By: Ashish_Raichura Posted On: Sunday, March 18, 2001 09:34 PM
i am using below package for sending automail when user become member of my site but here every goes correct only body part is not mailed to receiver.except this to,from,subject mailed to receiver that is abcd@hotmail.com.what is the problem,please solve this problem of my.this is the servlets. import sun.net.smtp.*; try { MAIL_TO = "abcd@hotmail.com" MAIL_HOST = "mail.server.com"; from ="ad@server.com"; subject = "Thanks for becoming Member"; body = "Dear Customer,"; SmtpClient mailer = new SmtpClient(MAIL_HOST); mailer.from(from); mailer.to(MAIL_TO); PrintStream ps = mailer.startMessage(); ps.println("From: " + from); ps.println("To: " + MAIL_TO); ps.println("Subject: " + subject); ps.println(body); mailer.closeServer(); } catch (Exception ex) { out.println("Message=" + ex.getMessage()); out.close(); }
Re: JavaMail
Posted By: John_Zukowski Posted On: Wednesday, March 21, 2001 06:38 AM