Results 1 to 5 of 5
- 11-24-2009, 07:16 AM #1
Member
- Join Date
- Feb 2009
- Posts
- 96
- Rep Power
- 0
problem with sending mail usin javaX.mail api
Hi to all ,
I am facing a problem with sending mail from owr own server host like
mail.---.in ,with some port --- .What my problem is my is excuting perfectly
when i give server host like gmail.com ,but when i am executing the same program by changing host server like mail.--.in[own server name] and own port like -- , i am getting exception like
I think this problem is because of my server problem or may be i don't any other reason .How to overcome from this problem.Please help me.javax.mail.MessagingException: Could not connect to
SMTP host: mail.---.in, port: --;
nested exception is:
java.io.IOException: Couldn't connect using "javax.net.ssl.SSLSocketFactory" socket factory to host, port: smtp.mail.---.in, 465; Exception: java.lang.reflect.InvocationTargetException
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
Thanks Regarding,
sandeepLast edited by sandeepsai39; 11-24-2009 at 09:44 AM.
- 11-25-2009, 02:09 AM #2
Senior Member
- Join Date
- Nov 2009
- Posts
- 235
- Rep Power
- 4
what is at javax.mail.Transport.send0(Transport.java:219)? should it be send() not send0()?
when you try to use google's mail server, you must use one they have. smtp.mail.---.in isn't a server google has. You can find them pretty easily but they are:
gmail-smtp-in.l.google.com
altX.gmail-smtp-in.l.google.com
where X is 1, 2, 3, 4
Also, if you use google's servers, you must also use standerd SMTP port 25. above it looked like it was trying to go to 465.Last edited by collin389; 11-25-2009 at 02:16 AM.
- 11-25-2009, 05:06 AM #3
Member
- Join Date
- Feb 2009
- Posts
- 96
- Rep Power
- 0
Actually I am not facing problems with when i am using google server the program is perfectly excuting with google server ,but the problem came into picture when i am using my company server , this is not because either Transport.send0(message) or Transport.send(message) methods in javax.mail.Transport class , I read th source code of javax.mail.Transport.send(message) method it is like
The proble is because of our server is unable to connect.we are using our server at host mail.---.in.Java Code:public static void send(Message msg) throws MessagingException { msg.saveChanges(); // do this first send0(msg.getAllRecipients()); }Last edited by sandeepsai39; 11-25-2009 at 05:09 AM.
- 11-25-2009, 05:18 AM #4
Senior Member
- Join Date
- Nov 2009
- Posts
- 235
- Rep Power
- 4
Oh, have you tried to telnet to the port and make sure the server works ok?
Last edited by collin389; 11-25-2009 at 05:20 AM.
- 11-25-2009, 05:37 AM #5
Member
- Join Date
- Feb 2009
- Posts
- 96
- Rep Power
- 0
.XML Code:have you tried to telnet to the port and make sure the server works ok Today
Thank u for u r quick reply. but iam slowly learning about javax.mail api and i am also week in net working . how would i try with i telnet ,where i find information telnet.I think your saying instead of using smtp.mail.---.in,your are prefering some thinking else by using telnet ,as i am a beginer it takes some time to understand all these concepts . OK, where i find all these information. If my thought is wrong what it is , or how it works? Mean while i search abt this in google. thank u.Last edited by sandeepsai39; 11-25-2009 at 05:49 AM.
Similar Threads
-
Problem in sending mail from java
By npoorni in forum Advanced JavaReplies: 1Last Post: 06-30-2009, 04:09 PM -
Facing problem while sending e-mail
By jay8186 in forum Java ServletReplies: 1Last Post: 03-25-2009, 07:34 AM -
Javax.mail.MethodNotSupported Exception in java mail api
By namarc in forum Advanced JavaReplies: 2Last Post: 05-05-2008, 06:01 AM -
I can't import javax.mail
By katie in forum New To JavaReplies: 2Last Post: 08-04-2007, 05:05 PM -
Sending a mail with the local mail program
By thedude in forum Advanced JavaReplies: 2Last Post: 07-23-2007, 12:19 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks