Questions tagged [apache-commons-email]

Apache Commons Email aims to provide a API for sending email. It is built on top of the Java Mail API, which it aims to simplify.

Apache Commons Email aims to provide a API for sending email. It is built on top of the Java Mail API, which it aims to simplify.

Some of the mail classes that are provided are as follows:

  • SimpleEmail - This class is used to send basic text based emails.
  • MultiPartEmail - This class is used to send multipart messages. This allows a text message with attachments, either inline or attached.
  • HtmlEmail - This class is used to send HTML formatted emails. It has all the capabilities of MultiPartEmail, allowing attachments to be easily added. It also supports embedded images.
  • ImageHtmlEmail - This class is used to send HTML formatted emails with inline images. It has all the capabilities of HtmlEmail but transforms all image references to inline images.
  • EmailAttachment - This is a simple container class to allow for easy handling of attachments. It is for use with instances of MultiPartEmail and HtmlEmail.

Official Website: http://commons.apache.org/email/

Useful Links:

Related Tags:

86 questions
0
votes
0 answers

Build failure trying to add new jars to maven project on the server

I have a Jsf 1.2 maven application. I try to send automatic-report emails to users regarding the application daily usage. I add the required Jar files in my local project workspace and it works fine. I can send the email without any problem.…
nudastack
  • 155
  • 1
  • 5
  • 18
0
votes
1 answer

Getting a weird cast exception : javax.mail.session cannot be cast to javax.mail.session

I am trying to use apche-commons-email API for sending an email, in my java web application. I have configured the jboss5 mail-service.xml to send emails from Gmail id. But I am getting the error org.jboss.resteasy.spi.UnhandledException:…
aquero
  • 843
  • 4
  • 13
  • 30
0
votes
1 answer

Unable to listen to events using Apache Commons Email

I'm sending emails using Apache commons email lib. However, I'm unable to listen to Connection and Transport events. I have added event listeners…
Burabari
  • 63
  • 1
  • 5
0
votes
0 answers

multipart email with inline attachment: part of excel sheet treated like an image

Quick question about about the .INLINE part of an attachment using the apache commons library. Basically I'm supposed to send part of an excel sheet via mail showing said part inside the body of the message which, if I'm not mistaken, should be…
Marchius
  • 115
  • 1
  • 3
  • 10
0
votes
1 answer

progress bar with apache common email

I am using apache common email library to send email , as follow // Create the attachment EmailAttachment attachment = new EmailAttachment(); attachment.setPath("mypictures/john.jpg"); …
Shahid Ghafoor
  • 2,991
  • 17
  • 68
  • 123
0
votes
1 answer

Apache Commons Email: How to send email over non SMTP api?

I'm replacing a class that used to send email over SMTP, now it will do it over another API. The interface I'm coding to sends in an Apache Commons Email class with the email prepared. I can't figure out how to either: Override the functionality of…
David Parks
  • 30,789
  • 47
  • 185
  • 328
0
votes
1 answer

Issue with setTo method in HtmlEmail for setting mail to multiple recipient

We have a module which will send reminder mail. We are using apache commons email library for sending mail. We have no issue if we send mail only one email address using addTo method of HtmlEmail, but we are encountering exception when we are trying…
sundar
  • 1,760
  • 12
  • 28
0
votes
1 answer

Unable to send Email with apache commons mail, javax.faces.event.AbortProcessingException

Am using apache commons email 1.2 ,Primefaces 3.2, Tomcat 7.0 mojarra 2.0.2 Whenever i try to send an email i get an AbortProcessingException *Caused by: java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: ()void* Any help…
Tom Mwenda
  • 155
  • 3
  • 16
0
votes
2 answers

OSGi GWT org.apache.commons.mail.EmailException

I have an OSGi application which has a command line interface and a GWT interface. I have a separate bundle that is responsible for sending emails. It uses Apache Commons Email. The email bundle only provides one method for sending email and all of…
Kris
  • 963
  • 1
  • 13
  • 22
0
votes
2 answers

Apache Commons Mail Erroring on Server Contact

I have a Java app that sends email via Apache Commons Email. The app works just find on my development environment, but when I deploy it to the server, I'm getting an error that Commons couldn't connect to the email server. …
Jeff
  • 877
  • 2
  • 11
  • 17
-4
votes
3 answers

Can not send email through gmail with Apache Commons Email.

Can not send email through gmail with Apache Commons Email.What is the problem? Email email = new SimpleEmail(); email.setHostName("smtp.gmail.com"); email.setSmtpPort(587); email.setTLS(true); …
ujava
  • 1,846
  • 5
  • 20
  • 24
1 2 3 4 5
6