Forums Register Login

Problem in sending mail using java mail

+Pie Number of slices to send: Send
Hi All,
What should be my entry in hosts file if I want to send an email to accounts in gmail and yahoo mails. I am developing a java application in which i want to send mail to gmail and yahoo accounts. I am using apache james as my mail server. What settings should be done in apache james. I have already read and tried the settings which are to be done in apache james.
Please help. I have tried a lot. No error comes in console but exception comes in log file of james server. :


10/03/08 13:33:13 INFO dnsserver: Couldn't resolve MX records for domain gmail.com.
10/03/08 13:33:13 WARN dnsserver: Query error!
java.net.PortUnreachableException
at sun.nio.ch.DatagramDispatcher.read0(Native Method)
at sun.nio.ch.DatagramDispatcher.read(DatagramDispatcher.java:25)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
at sun.nio.ch.IOUtil.read(IOUtil.java:206)
at sun.nio.ch.DatagramChannelImpl.read(DatagramChannelImpl.java:324)
at org.xbill.DNS.UDPClient.recv(UDPClient.java:49)
at org.xbill.DNS.UDPClient.sendrecv(UDPClient.java:70)
at org.xbill.DNS.SimpleResolver.send(SimpleResolver.java:256)
at org.xbill.DNS.ExtendedResolver$Resolution.start(ExtendedResolver.java:93)
at org.xbill.DNS.ExtendedResolver.send(ExtendedResolver.java:359)
at org.apache.james.dnsserver.DNSServer.rawDNSLookup(DNSServer.java:337)
at org.apache.james.dnsserver.DNSServer.lookup(DNSServer.java:291)
at org.apache.james.dnsserver.DNSServer.findMXRecords(DNSServer.java:249)
at org.apache.james.dnsserver.DNSServer$1.<init>(DNSServer.java:427)
at org.apache.james.dnsserver.DNSServer.getSMTPHostAddresses(DNSServer.java:426)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:134)
at $Proxy0.getSMTPHostAddresses(Unknown Source)
at org.apache.james.James.getSMTPHostAddresses(James.java:860)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:134)
at $Proxy9.getSMTPHostAddresses(Unknown Source)
at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:452)
at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1122)
at java.lang.Thread.run(Thread.java:595)
10/03/08 13:33:13 INFO dnsserver: Couldn't find CNAME records for domain gmail.com.
10/03/08 13:33:13 ERROR dnsserver: Couldn't resolve IP address for host gmail.com.



Waiting for a positive reply ......
Thanks in advance.
+Pie Number of slices to send: Send
You don't need to fiddle with host files to do this. The root problem is this "Couldn't resolve IP address for host gmail.com". You need to investigate your network setup why it can't resolve a host name to an IP address.
+Pie Number of slices to send: Send
How can I do this. Please guide me. I have installed James on my desktop machine itself. My desktop machine is acting as my mail server. Where do i check if my network is ok.???
+Pie Number of slices to send: Send
Can you run a desktop app that looks up a host name, like this one?
+Pie Number of slices to send: Send
I ran the desktop application and I got the following output on running LookUpReach.java application :


Name: gmail.com
Addr: 72.14.253.83
Reach: true

 
Hey cool! They got a blimp! But I have a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1727 times.
Similar Threads
Error while accessing JNDI Bindings over IIOP
404 error loading
Help with Configuring Tomcat in Eclipse
Problem regarding JavaMail
while restart the jboss server it give access denined problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:47:40.