Sheetal, Did you check port number used by mail server.
Thanks & Regards Sunil Sahu Sr. Software Engineer Ph. +91-124-4047100 Ext. 752 "Patil, Sheetal" <[EMAIL PROTECTED]> 06/16/2006 11:49 AM Please respond to "Struts Users Mailing List" <user@struts.apache.org> To "Struts Users Mailing List" <user@struts.apache.org> cc Subject RE: urgent- exception in sending e-mail from application Oh my mistake Actually Our network is 10.9.57.* And Smtp is on 10.9.55.29 ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 11:53 AM To: Struts Users Mailing List Cc: Patil, Sheetal Subject: RE: urgent- exception in sending e-mail from application Sheetal, I don't think there is any problem with network, because if you are able to ping it, then it should connect also by your program but for this you need the port number. You are also saying that smtp server is not on your network but it is clear from the ip address that both are using same VLAN i.e. "57". so leave it and check the port used by you mail server. Thanks & Regards Sunil Sahu Sr. Software Engineer Ph. +91-124-4047100 Ext. 752 "Patil, Sheetal" <[EMAIL PROTECTED]> 06/16/2006 11:40 AM Please respond to "Struts Users Mailing List" <user@struts.apache.org> To "Struts Users Mailing List" <user@struts.apache.org> cc Subject RE: urgent- exception in sending e-mail from application No smtp server is not on our network Our network is 10.9.57.* And Smtp is on 10.9.57.29 -----Original Message----- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 11:32 AM To: Struts Users Mailing List Subject: RE: urgent- exception in sending e-mail from application Is it the same network? --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > Ye I can ping to host > > Pinging smtp-host-name [IP] with 32 bytes of data: > > Reply from IP: bytes=32 time=361ms TTL=125 > Reply from IP: bytes=32 time=323ms TTL=125 > Reply from IP: bytes=32 time=326ms TTL=125 > Reply from IP: bytes=32 time=252ms TTL=125 > > Ping statistics for IP: > Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), > Approximate round trip times in milli-seconds: > Minimum = 252ms, Maximum = 361ms, Average = 315ms > > > > -----Original Message----- > From: Mon Cab [mailto:[EMAIL PROTECTED] > Sent: Friday, June 16, 2006 11:12 AM > To: Struts Users Mailing List > Subject: RE: urgent- exception in sending e-mail from application > > Are you on the same network as the SMTP host? Can you ping the host? > > > > --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > > > Hi thx for reply > > > > I have tried to use the authentication, as u describe but still the > > exception is same > > > > Thanks > > Shital > > > > -----Original Message----- > > From: Mon Cab [mailto:[EMAIL PROTECTED] > > Sent: Friday, June 16, 2006 10:48 AM > > To: Struts Users Mailing List > > Subject: Re: urgent- exception in sending e-mail from application > > > > Patil > > > > Your smtp server may require authentication. Find out and, if so, > > Add > > the following lines to your code. > > > > > > class MyAuthenticator extends Authenticator > > { > > protected PasswordAuthentication getPasswordAuthentication() > > { > > PasswordAuthentication pa = > > new > > PasswordAuthentication(username,password); > > return pa; > > } > > } > > > > props.put("mail.smtp.auth", "true"); > > Authenticator a1= new MyAuthenticator(); > > Session mailsession = Session.getDefaultInstance(props, a1); > > > > > > > > --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello friends > > > I am trying to send mail from my application > > > Here is the code > > > Properties properties = System.getProperties (); > > > properties.put ("mail.smtp.host","smtp host name"); > > > > > > Session session = Session.getDefaultInstance > > > (properties,null); > > > > > > Message message = new MimeMessage (session); > > > try > > > { > > > message.setFrom (new InternetAddress > > > ("[EMAIL PROTECTED]")); > > > message.setRecipient > (Message.RecipientType.TO,new > > > InternetAddress ("[EMAIL PROTECTED]")); > > > message.setSubject ("Hi "); > > > message.setText ("How is it going ?"); > > > message.setSentDate (new Date ()); > > > Transport.send (message); > > > System.out.println ("Message sent !!!"); > > > } > > > catch (MessagingException e) > > > { > > > e.printStackTrace (); > > > } > > > > > > But this code is giving me exception > > > javax.mail.MessagingException: Could not connect to SMTP host: > > > smtp-host-name, port: 25 > > > is there any additional setting's required for this one > > > plse let me know > > > Sp > > > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]