File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to detect a firewall

 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I wrote a program that sends out an email, My smtp setting are set properly
but it still doesn't run. Could anyone tell me how to detect if p.c is behind a firewall and then how to de-activate it. When i ping local host i get the following:

but wheni rry to ping hotmail or some other site i get the following:

Could someone plz explain to me what the above msg means?. And how to detect and then de-activate a firewall. Any help or suggestions would be greatly appreciated. Thanks
 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please help me out? I have wrote a java program that sends out emails. It compiles fine and when i run it . gives me the following error

I'm thinking its a firewall issue. But don't know how to detect it and then de-activate it. Any suggestions would be greatly appreciated
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most sites have ping blocked because attackers use it to bog down servers.
As far as your other request, it is what every spammer in the world would like to do. The firewall is there to keep people from doing what you want to do.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jonty rhodes:
And how to detect and then de-activate a firewall.
And what good is a firewall if Joe Average shut it down at will?
 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take it easy guys. A simple " no, you can't deactivate it" could have send the message across as well. What a way to help a begineer learn.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to get a mail client such as Mozilla/Thunderbird/OutlookExpress to work on the same system sending and receiving mail from your ISP's mail server. Then use the same settings in your program. Be aware that if your program goes into a loop or overloads your ISP's mailserver in any way, or your ISP thinks you are a spammer, then the consequences could be uncomfortable and expensive.
However, this could be a valid method of sending yourself a mail or SMS if you are monitoring a system or a process which should be continuously available.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us the code you use for sending?
 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my code for sending. As i said earlier, it compiles fine. I'm also able to send out email using outlook and have used the same settings here.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
props.put("mail.smtp.host","smtp");

Try using the full domain name for the SMTP host, e.g. "smtp.domain.com".
 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My ISP is rogers high speed in toronto. I called them and thats what they gave me for their outgong mail server ("smtp"). I followed your advice and changed it to "smtp.rogers.com" . Its still giving me the same runtime error. Any other suggestions?. I really want to ge this working. So, Please if theres anything else that can be done, let me know. THanks in advance
 
Stephen Huey
Ranch Hand
Posts: 618
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Theirs may not be named smtp.rogers.com, so call them again and tell them that you need the full name of the SMTP server (if necessary, tell them you're not using Outlook or something like that and so their shortcut or whatever you call it isn't working in your case). I think I remember RoadRunner having me just use "smtp" in my mail client, but I'm betting that's just some sort of alias that doesn't seem to be working right for your Java program.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could always install an SMTP server on your local PC and use it instead of your ISP. That is unless your ISP is blocking port 25. In fact, come to think of it, you should make sure that they are using the standard port 25 for SMTP. JavaMail will use port 25 by default for SMTP.
 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please tell me where to install a SMTP server from? and what to do if my ISP is using port 25?. Thanks alot in advance. I think we're getting closer to making it work. THanks
 
James Swan
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following along the lines of maybe they don't use "smtp.roger.com", depending on what your OS is try to see what your DNS search suffix is.
I am assuming you're connected to the internet using rogers, try running this command:
ipconfig /all
and see what the line "Primary DNS Suffix" or "DNS Suffix Search List" says, chances are it might not say "rogers.com".
Then try that value as "smtp.whatever-dns-suffix-is-listed.com"
 
jonty rhodes
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its working now!!. Thanks alot guyz for not giving up on me. I really appreciate it. I downloaded a SMTP server. and thats all it took. Thank you very much for leading me to right path.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jonty rhodes:
Its working now!!. Thanks alot guyz for not giving up on me. I really appreciate it. I downloaded a SMTP server. and thats all it took. Thank you very much for leading me to right path.

Glad we could help! Tell all your friends!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic