• Post Reply Bookmark Topic Watch Topic
  • New Topic

using smtp.nescape.net to send e-mail

 
daniel schulken
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam tryingto send e-mail from a java program directly thru netscapes smtp server andkeep getting error.Iseem to be stumped any ideas?
thanks
daniel schulken
String host = "smtp.netscape.net";
String from = "user@netscape.com";
String to = "user@comcast.net";
Properties props = System.getProperties();
props.put( "mail.smtp.host", host );
Session sessionmail = Session.getDefaultInstance( props, null );
sessionmail.setDebug( true );
Session session =
Session.getInstance(props, null);
// Store store = session.getStore("pop3");
// store.connect(host, "user@netscape.net", "user");

MimeMessage message = new MimeMessage(sessionmail);
//Transport tr = sessionmail.getTransport("smtp");
//tr.connect(host, "user@netscape.net", "user");
//message.saveChanges();// don't forget this
// Define message
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));
message.setSubject("Locate a Vehicle");
message.setText("<Name> ef_Name" +
" " + "<Address> ef_Address" +
" " + "<City> ef_City" +
" " + "<State> ef_State" +
" " + "<Zip> ef_Zip" +
" " + "<Phone> ef_Phone" +
" " + "<Email> ef_Email" +
" " + "<Year> ef_Year" +
" " + "<Make> ef_Make" +
" " + "<Model> ef_Model" +
" " + "<Series> ef_Series" +
" " + "<Miles> dd_Miles" +
" " + "<Color Choice 1> ef_Color1" +
" " + "<Color Choice 2> ef_Color2" +
" " + "<Color Choice 3> ef_Color3");
// Send message
Transport.send(message);
//tr.send(message );
//tr.sendMessage(message , message.getAllRecipients());
//tr.close();
}
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I tried to telnet to port 25 at smtp.netscape.com and it looks like a black hole. Are you sure you're allowed to connect to it?
 
daniel schulken
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is what netscape mail goes thru.
err settings in the netscape mail client.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it use pop-before-smtp to punch a hole in the firewall? Since SMTP doesn't have authentication, many sites use this. What it means is that you can't access the SMTP server unless your same IP address has successfully authenticated with the POP (or IMAP) server within some set time period immediately before. Try retrieving mail, then running your program right after.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!