• 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

How to set SMTP server

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I am new to Java mail. I have tested a mail send program. It is working on smtp.sify.com and it is sending mail only when "To" address created in Sify mail server. I tried to use smtp.yahoo.com & smtp.gmail.com and not working. Please help me.

Thanks in advance

jayalakshmi





 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jayalakshmi,

In order to send mail you need to access and mail server. You may not use yahoo or gmail since you are not authenticated to use it. You need to give your user name and password to use that server for sendin mail.

For sending and receiving mails you can use

Apache James server. Take sometime learn e-mail basics and especially James server so that you can set up your own mail server on your machine and send and receive them.

Regards
 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java Mail API can be only used as a mail client. Not as a mail server.

For reading mails we connect to pop3 server and retrieve mails from the server.
You will be able to receive mails from yahoo and gmail.com only if you have pop access in their servers.
 
reply
    Bookmark Topic Watch Topic
  • New Topic