954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Is there a Right Host to use?

i got an example form roseindia on how to send an email. Now it works perfectly like this, and i can send mail to my email adress with that code (thats just a part of it)

String host = "192.168.1.14"; 
String from = "Admin@Admin.com"; 
String to = "myEmailadress.com";

but the host name is the one i copied from rose india, it works, but i take it its not the right one i should use? What host should i use?

This is where i got the code, and mine lools exacly the same, except, it has my email at "to" http://www.roseindia.net/javamail/sending-message-using-java-mail.shtml

Mr.BunyRabit
Junior Poster
147 posts since Aug 2010
Reputation Points: 9
Solved Threads: 1
 

hmm as far as i know the host would be your email holders pop3 or smtp server address. ie googles SMTP address for gmail is

smtp.gmail.com or pop.gmail.com

yahoo is:
smtp.yahoo.com or pop.yahoo.com etc just google it,

however you then need password authentication try using the JavaMAil API-if you arent already as java has no built in email api- however it does not come with the core jdk envrioment.

Heres an example for you of java mail api on some other forum it does password authentication to:

http://www.codemiles.com/java/email-through-java-program-t1408.html

DavidKroukamp
Practically a Master Poster
Team Colleague
693 posts since Dec 2011
Reputation Points: 282
Solved Threads: 169
 

welll ... if it works, why do you assume this one does not qualify as being a "right" host name? (it's actually the host's IP address, not really a hostname)

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 
welll ... if it works, why do you assume this one does not qualify as being a "right" host name? (it's actually the host's IP address, not really a hostname)

haha thats true, Its because i dont know where that host's IP address comes from. And i dont want to swamp some ones server or kill some ones cat when i start sending ALLOT of emails.
But if you dont think it can cause any harm, or break in a few months, ill leave it like that =)

Mr.BunyRabit
Junior Poster
147 posts since Aug 2010
Reputation Points: 9
Solved Threads: 1
 

it might break (I guess) but since it's still online since 2008, I doubt it'll drop within a week :)

personally, I don't know exactly what kind of services/software you need to have running to use your own machine as a mail server (possible, but not the easiest thing to do, I assume), but, as long as you don't want to receive mail that way, just send it, I think this solution will help you out just fine :)

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

it might break (I guess) but since it's still online since 2008, I doubt it'll drop within a week :)

personally, I don't know exactly what kind of services/software you need to have running to use your own machine as a mail server (possible, but not the easiest thing to do, I assume), but, as long as you don't want to receive mail that way, just send it, I think this solution will help you out just fine :)

haha sounds good, ill try some time to see if i can find like an ip to hotmails serverse or Something? But ill google some more for that. Till then, ill use this.
Thank you!

Mr.BunyRabit
Junior Poster
147 posts since Aug 2010
Reputation Points: 9
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: