Code Monkey home page Code Monkey logo

simple-java-mail's Introduction

Here are some basic instructions to build and run the test class.

With Ant (default target is 'run'):

ant clean:
- deletes the entire target folder

ant compile:
- compiles all classes to the target folder

ant run -Dhost=smtp.somehost.com -Dport=port -Dusername=username -Dpassword=password
- runs the testclass with the given smtp server and account

ant jar:
- creates a library jar from the framework


-----------------------------------------------

Compiling and running the testclass from the command line:

mkdir target\classes
javac -cp lib\mailapi.jar;lib\smtp.jar;lib\log4j-1.2.15.jar;lib\activation.jar -d target\classes src\MailTest.java src\org\codemonkey\simplejavamail\*.java
java -cp lib\mailapi.jar;lib\smtp.jar;lib\log4j-1.2.15.jar;lib\activation.jar;target\classes -Dhost=smtp.someserver.com -Dusername=joe -Dpassword=sixpack  MailTest

simple-java-mail's People

Watchers

 avatar

simple-java-mail's Issues

Access to headers and flags...

One other thing which I spotted which aren't catered for by SimpleJavaMail but 
are by the Javamail API.

Headers
-------
Personally, I hate them, but clients are always asking if you can set the 
"important" flag on emails.  This is normally done by setting custom headers 
such as X-Priority and Importance.  To do this, javamail provides 
message.setHeader(String,String).  Would be good to be able to do this in 
simplejavamail

I'm now using simplejavamail "in anger" (although still in a testing phase) so 
I may well suggest some other enhancements as I find them.

As I said last time, great work...much easier than the javamail api.

Tom

Original issue reported on code.google.com by [email protected] on 18 Aug 2011 at 4:31

NullPointerException in Mailer.sendMail(Email) when the Mailer(Session) constructor is used

When calling

    new org.codemonkey.simplejavamail.Mailer(mySession).sendMail(myEmail);

the following exception occurrs:

    Exception in thread "main" java.lang.NullPointerException
        at org.codemonkey.simplejavamail.Mailer.logSession(Mailer.java:260)
        at org.codemonkey.simplejavamail.Mailer.sendMail(Mailer.java:238)
        at MyClientCode

This is because Mailer.logSession(Session, TransportStrategy) tries to access 
members of the TransportStrategy, which was never initialized by the 
Mailer(Session) constructor.

Original issue reported on code.google.com by [email protected] on 19 Sep 2012 at 6:10

Minor enhancement

This is more a feature enhancement than a bug report.  The library seems 
excellent, but the one thing it doesn't support is the "reply to" option which 
JavaMail does.  Should just be a case of adding

1. a setReplyTo(String replyto) method to Email
2. a getReplyTo() method to Email
3. a check in Mailer to see whether a reply to is set and use it

This can be quite an important flag if using libraries in applications where 
you are sending on behalf of someone else.

Other than that, excellent work.

Original issue reported on code.google.com by [email protected] on 19 Jul 2011 at 9:01

Need to document developer logging

Need to document developer logging options, system properties, 
logging.properties, etc.

I could find no information on this on your page.  If there, please provide a 
link...

Thanks,
Jeff

Original issue reported on code.google.com by [email protected] on 2 Nov 2012 at 12:07

Catastrophic backtracking in validation regexes

There are some email addresses that behave *very* poorly with the validation 
done in EmailValidationUtil.  I think it might be due to the nested quantifiers 
in the complex regexes there.  They literally take hours to finish the 
validation, using 100% CPU.

Is there any way to fix this, and barring that, can an option be added to skip 
validation?

To reproduce:
1. Try to send an email to an address like 
[email protected]
2. Wait for computer to explode

(Using java 1.6.0_31)

Original issue reported on code.google.com by [email protected] on 20 Apr 2012 at 10:13

Email attachments are not correctly encoded (the names)?

What steps will reproduce the problem?
1. Attach a file with åäö characters in them (like image)
2. Recieve the email and see åäö is now incorrectly encoded.
3.

What is the expected output? What do you see instead?
The file attached with correct name. The file attached with swedish characters 
garbled


What version of the product are you using? On what operating system?
2.1


Please provide any additional information below.
I did a quick google and mail attachmanet names needed to be encoded correctly. 
And I wonder if this is lacking.

Original issue reported on code.google.com by [email protected] on 23 Jul 2013 at 11:06

Would be nice to add mock junit testing support

It would be nice to add a feature that performs all sorts of validations on the 
email, but stops short from actually delivering the email over the network.  
For unit testing purposes, etc.

Original issue reported on code.google.com by [email protected] on 12 Jul 2012 at 1:50

Unicode in local part of email address fails

What steps will reproduce the problem?
1. Try to send email to å[email protected]

What is the expected output? What do you see instead?
Email should send according to http://tools.ietf.org/html/rfc6531

Instead i get: Get this error Could not send email. Inner error: Invalid TO 
address: org.codemonkey.simplejavamail.Email@60e6e627

What version of the product are you using? On what operating system?
I use 2.1 on windows

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Sep 2014 at 9:47

Simple email sending doesn't work

What steps will reproduce the problem?
1. Just trying to implement the example that you provided in the wiki

What is the expected output?
Nothing just email has to be sent...

What do you see instead?
See here: http://pastebin.com/t58fWEpG

What version of the product are you using? On what operating system?
Latest

Please provide any additional information below.
Trying to send email with gmail. Added your libraries and code compiles OK. I'm 
using Eclipse on Xubuntu 11.10.

Original issue reported on code.google.com by [email protected] on 31 Jul 2012 at 3:28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.