dcsimg
how to send message to outlook2000 indox.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   karthik_rajan
Posted On:   Monday, August 13, 2001 12:58 AM

i'm new to javamail 1.2.i made a small program, please see the code. ---------------------------------- <%@ page import="javax.mail.*,javax.mail.internet.*,java.util.*" %> <% Properties props = new Properties(); props.put("mail.smtp.host", "localhost"); Session s = Session.getInstance(props,null); MimeMessage message = new MimeMessage(s); InternetAddress from = new InternetAddress("128.97.2.22"); message.setFrom(from); InternetAddress to = new InternetAddress("128.97.2.22"); message.addRecipient(Message.RecipientType.TO, to); message.setSubject("Test from JavaMail.");    More>>

i'm new to javamail 1.2.i made a small program,
please see the code.
----------------------------------
<%@ page import="javax.mail.*,javax.mail.internet.*,java.util.*" %>

<%
Properties props = new Properties();
props.put("mail.smtp.host", "localhost");
Session s = Session.getInstance(props,null);

MimeMessage message = new MimeMessage(s);

InternetAddress from = new InternetAddress("128.97.2.22");
message.setFrom(from);
InternetAddress to = new InternetAddress("128.97.2.22");
message.addRecipient(Message.RecipientType.TO, to);

message.setSubject("Test from JavaMail.");
message.setText("Hello from JavaMail!");
Transport.send(message);
%>
1)))the problem is i'm getting SMTP host not found and connection refused problem,if i use localhost in the put()method.my machime is not connected to any other outside world.i want a mail send to my machine in my outlook2000 indox,please tell me how to do.

2)))how to send the mail in other machine.all our machine is in LAN.

i'm waiting to proceed.
please help me.
thanks in advance.
regards
karthik

   <<Less
About | Sitemap | Contact