Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I get SMTP server IP addresses for hotmail,rediff or yahoo servers  RSS feed

 
dipali doke
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am doing project in Java "PC To Mobile SMS Service".
Here I am making connection using SmtpClient API.
I need to connect to any SMTP server of Hotmail or yahoo or rediff
to forward my request to which will further provide it to
ideacellular.net

Code is like this: Just see that SmtpClient().What IP address should be
specified


boolean SendSMS(PrintWriter out,String mobileno, String message)
{
boolean success = false;
PrintStream ps = null;
String s1 = null;
SmtpClient sendmail = null; // Creating object of SmtpClient

out.println("<br>Sending SMS TO " + mobileno + "@ideacellular.net");
out.println("<br>Message is : " + message);
try
{
// OPEN SMTP CONNECTION.
out.println("<br>Trying to establish connection with server.");

sendmail = new SmtpClient("219.65.84.138");
// Which IP address I should provide here which will do relaying
// of request.
sendmail.from("agccomp@vsnl.net");
sendmail.to(mobileno + "@ideacellular.net");
//GET PRINTSTREAM

if (sendmail.serverIsOpen())
{
ps = sendmail.startMessage();
}
else
{
out.println("Server is not open") ;
}
}//try
catch(Exception e)
{
e.printStackTrace();
e.printStackTrace(out);
return false;
}//catch

try
{
//
ps.println(message);
ps.flush();
ps.close();
sendmail.closeServer();
}//try
catch(Exception e)
{
out.println("<br>Can not close the server.");
e.printStackTrace();
return false;
}//catch
return true;
}
}


If any body knows any SMTP server address or link for that please let
me know.
It's urgent!

With regards,
Dipali.
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about looking at the Yahoo e-mail FAQ? Be aware that access to Yahoo's SMTP service requires a paid subscription and request authentication. I can't speak for any other mail service.
[ May 21, 2004: Message edited by: Joe Ess ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!