How to send an Email using Java Mail API in a Java web application ?


Author: Dinesh Varyani
38817 View
28m 6s Lenght
211 Rating


CLICK TO DOWNLOAD COMPLETE SOURCE CODE - http://www.hubberspot.com/2014/09/how-to-send-email-using-java-mail-api.html *********************************************** Do Watch Video in High Quality ... ***********************************************


Comments

  1. very nic sir
  2. bro how to download source code ....
  3. Brilliant! Thanks!
  4. Add this
    props.setProperty("mail.smtp.ssl.enable", "true");
    props.setProperty("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
  5. I am receiving the message - Mail sent but not receiving it in the inbox. What could be the reason ?
  6. is it possible to upload the sourse code ?, the link in your site is not good
  7. its nice work ....
  8. No error in the code but not able to send mail !! plzz help
  9. sir code is correct but i didn't get message to my gmail.... what i want to do....
  10. can not download the project?
  11. i m getting problem in sending i am getting waiting for localhost
  12. Perfact code................................
  13. mailMessage.setContent(message, "html/text"); < ---- should be changed to --> mailMessage.setText(message);

    Otherwise mail is send in form of unknown attachment rather than simple text which need to be downloaded by recipient to read it.


    Rest is fine in tutorial.
  14. org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [MailDispatcherServlet] in context with path [/EmailSenderApp] threw exception
    java.lang.NullPointerException
  15. Que tal amigo porfavor algun proyecto que tengas para adjuntar archivos con java email ?
  16. I got this when I would do the "mailsender.sendEmail(fromEmail, username, password, toEmail, subject, message);"
    Can you please help as soon as possible because I'm trying to incorporate this into my senior project PLEEEEASSSEEE.

    "Warning: standardwrappervalve[MailDispatcherServlet]: Servlet.service() for servlet MailDispatcherServlet threw exception
    java.lang.NullPointerException"

    And when I hit send, it displays a blank page that is linked to the servlet but again the error above displays. When I take off "mailSender.sendEmail(fromEmail, username, password, toEmail, subject, message);" It displays the message and redirect link but no email of course.

    Again Can you PLEEEEAAASSSEEEE help me as soon as possible.
  17. Hi, I have got "Mail sent successfully" message, but mail doesn't sent.
  18. hi, there is no error but mail doesn't sent. I have used GlassFish server. Thanks.
  19. thank you for this video , it is very very very good, I do not need the source code as you explain it well