Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2010
    Posts
    26
    Rep Power
    0

    Post send mail problem

    properties.setProperty("mail.smtp.host", "smtp.gmail.com");

    is used only for gmail but i use for all the mail server host
    so what i can do for that

    please help me

    Thanks in Advance..

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    No idea what you're asking, but if what you mean is that you need different hosts at different times, then use different hosts at different times. I.E. create different Properties objects, of course, even if you create them only directly before using them.

  3. #3
    Join Date
    Mar 2010
    Posts
    26
    Rep Power
    0

    Default

    thanks
    but any other way to resolve this problem

  4. #4
    Join Date
    Mar 2010
    Posts
    26
    Rep Power
    0

    Default

    Quote Originally Posted by masijade View Post
    No idea what you're asking, but if what you mean is that you need different hosts at different times, then use different hosts at different times. I.E. create different Properties objects, of course, even if you create them only directly before using them.
    e.g smtp.gmail.com
    instead of any common mailserver name for all like gmail, yahoo,hotmail, etc.....

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    You should know what mail server you use. There is no "generic" mail server. If you want to make it configurable for users then see the Properties and/or Preferences classes.

  6. #6
    Join Date
    Mar 2010
    Posts
    26
    Rep Power
    0

    Default

    what is Preferences Classes????

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

Similar Threads

  1. Send mail using a contactform
    By kroken in forum JavaServer Pages (JSP) and JSTL
    Replies: 18
    Last Post: 11-19-2010, 07:31 AM
  2. Send and Receive mail using J2ME
    By chale in forum CLDC and MIDP
    Replies: 2
    Last Post: 08-07-2009, 11:44 AM
  3. Help, Please!!! Can't Send Mail with SmtpClient
    By jfcup in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-07-2008, 12:46 PM
  4. JSP send mail script not working.
    By profuse in forum Java Applets
    Replies: 1
    Last Post: 05-27-2008, 06:37 AM
  5. Send a pic through mail, in java
    By lenny in forum Advanced Java
    Replies: 1
    Last Post: 07-25-2007, 02:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •