• 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

SmtpClient

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While sending mail using sun.net.smtp.SmtpClient
we have to specify the MAIL_HOST in the coding itself.
How can I change the host according to the
MAIL_TO address.Suppose if I want to mail to one ID
in yahoo eg. name@yahoo.com then the host should
be www.yahoo.com, like wise if it is name@rediffmail.com
then the host shold be www.rediff.com.
Please help how to change the host wihtout getting
as input filed.
Thanks
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should never need to change the mail host once you have one which works. Email is a distributed system, and each host will forward the message to the appropriate destination for you.
Try it.
 
unna kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply.
SmtpClient ss=newSmtpClient("mail.yahoo.com")
Using the above code, can I send email to a person having
email address other than yahoo.com. i.e.(Mail_To: name@usa.net)
I have tried this.It was not working.
But you have said that email is a distributed system, and each
host will send that email to appropriate destination.
Please help out.
Thankx again.
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It may be that mail.yahoo.com won't forward emails. Keep looking until you find a mail host which will. How do you get your internet connection? Almost all ISPs provide a mail host as part of the service.
 
unna kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sir , I am connecting net thru VSNL.
I will try using www.vsnl.com as mail host.
Hope this will work.
Thankyou very much.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct me if I ma wrong........
Unna,

if u r using www.vsnl.com
then they are having their own mail host. You need to use that smtp host.
Now when you post anything@yahoo.com,
it will connect to the smtp host you specified.
That smtp host will connect to the gateway of the vsnl,through the routers.
Now ur request is at the gateway, this will distribute ur request depending on the address u specified, ie yahoo.
That means at the time of coading ur mail client u need to specify only ur smtp host.

Shashank
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've looked through the help pages at www.vsnl.com , especially the one at http://www.vsnl.com/english/userguide/netscape.htm and they recommend that you set
your SMTP server (for outgoing messages) to: 202.54.1.18 and
your POP3 server (for incoming messages) also to: 202.54.1.18
Try that and see how you get on.
 
unna kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You very much for your
immediate response.
Unna
 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic