Results 1 to 10 of 10
  1. #1
    Hussain Ali is offline Member
    Join Date
    Feb 2010
    Posts
    37
    Rep Power
    0

    Default how to send an email

    hello,
    I am trying to send mail
    I am using JavaMail API in eclipse
    when I am trying to send mail then it gives an following error


    javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 995, response: -1
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTra nsport.java:1694)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SM TPTransport.java:525)
    at javax.mail.Service.connect(Service.java:291)
    at javax.mail.Service.connect(Service.java:172)
    at javax.mail.Service.connect(Service.java:121)
    at javax.mail.Transport.send0(Transport.java:190)
    at javax.mail.Transport.send(Transport.java:120)
    at EmailAttachmentDemo.sendEmail(EmailAttachmentDemo. java:69)
    at EmailAttachmentDemo.main(EmailAttachmentDemo.java: 19)

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  3. #3
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    364
    Rep Power
    5

    Default

    Use SEARCH on this forum
    there are many examples right here on this forum for your problem

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  5. #5
    Hussain Ali is offline Member
    Join Date
    Feb 2010
    Posts
    37
    Rep Power
    0

    Default

    yes i ve tried y?

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  7. #7
    Hussain Ali is offline Member
    Join Date
    Feb 2010
    Posts
    37
    Rep Power
    0

    Default

    yes its working.

    but i ve found it from google


    thanks

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  9. #9
    Hussain Ali is offline Member
    Join Date
    Feb 2010
    Posts
    37
    Rep Power
    0

    Default

    how can i marked thread as a solved

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Using freemarker to send an email in Japanese utf-8
    By mackstar in forum New To Java
    Replies: 0
    Last Post: 09-01-2009, 10:49 AM
  2. how to send an email
    By painamrata in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 02-22-2009, 04:28 PM
  3. send email using JMS
    By Heather in forum Advanced Java
    Replies: 9
    Last Post: 01-07-2009, 03:04 PM
  4. send email using apache commons email
    By jnamendi in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 10-14-2008, 05:55 PM
  5. Email send problem
    By serjant in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 09-19-2008, 02:15 AM

Posting Permissions

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