Have a look of this:
private void inviaMail(String IndMail, String Name)
{
{
Properties properties = new Properties();
properties.put("mail.smtp.host","smtp.galactica.it");
properties.put("mail.from","[EMAIL PROTECTED]");
Session session = Session.getInstance(properties, null);
Message message = new MimeMessage(session);
InternetAddress[] address = {new InternetAddress(IndMail)};
message.setRecipients(Message.RecipientType.TO, address);
message.setFrom(new InternetAddress(fromaddress);
message.setSubject(Subject);
message.setContent(Name+"\n"+text,"text/plain");
Transport.send(message,address);
}catch(Exception e) {
System.out.println(e);
}
}
Regards
Rinaldo Bonazzo
[EMAIL PROTECTED]
-----Messaggio originale-----
Da: A mailing list for discussion about Sun Microsystem's JavaServlet
API Technology. [mailto:[EMAIL PROTECTED]]Per conto di Raj
Kumar Jha
Inviato: luned� 30 ottobre 2000 10.31
A: [EMAIL PROTECTED]
Oggetto: Re: sendmail equiv in NT
Try using the javamail api...
----- Original Message -----
From: Abhishek Basu Mallick
To: [EMAIL PROTECTED]
Sent: Monday, October 30, 2000 2:52 PM
Subject: sendmail equiv in NT
hi,
is there an equivalent to "sendmail" for the NT platform?
My problem is that I have to send mails from a servlet.
can someone help.
thanx in advance.
regards,
Abhishek BasuMallick
Cisco Projects
ZenSar Technologies Ltd.
--------------------------------------
What a great time to be a nerd !!
--------------------------------------
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html