• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using smtp.nescape.net to send e-mail

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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();
}
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I child proofed my house but they still get in. Distract them with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic