Java - Emailing Module

Hi Sirs,
I am in the middle of completing my first Java application. It's a payroll system.
I have using aspemail for years along with dBASE, and the email component is just powerful.
Unfortunately I am having problems to integrate it as it is a COM resource.
The choice that I am left with is JavaMail. Actually the emaiing module should be handling 3000 emails (payslips) at each payroll closure.
From your experience, is JavaMail suitable in this case.
Any other suggestion will be welcome.
Omer-PitouAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dpearsonCommented:
JavaMail is perfectly fine for this sort of usage.  It doesn't really send the email - it just provides an API to pass the email off to an SMTP server which actually does the email delivery.

We use JavaMail for sending our email and send over a million emails a month using it.  So 3,000 isn't going to be a problem.

Doug

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Omer-PitouAuthor Commented:
Thanks Doug... That is what I wanted to hear. Does JavaMail provide encryption feature?
dpearsonCommented:
Yes JavaMail can connect to an SMTP server using SSL.

Doug
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Omer-PitouAuthor Commented:
Thanks Doug. Do you any  sample of code which includes these extra features. This can save me some time.
dpearsonCommented:
The main challenge I found with JavaMail is that everything is set via "properties" and there's not a ton of documentation about those properties.

Here's the set we use - which probably will at least give you some pointers of what to look for:

			Properties props = mailServer.getProps() ;

			if (mailServer.useSSL()) {
				props.put("mail.transport.protocol", PROTOCOL_SMTP);
				props.put("mail."+PROTOCOL_SMTP+".host", mailServer.getHostname());
				props.put("mail."+PROTOCOL_SMTP+".auth", "true");
				props.put("mail."+PROTOCOL_SMTP+".starttls.enable", "true");
				props.put("mail."+PROTOCOL_SMTP+".port", mailServer.getPort());
				props.put("mail."+PROTOCOL_SMTP+".socketFactory.port", mailServer.getPort());
				props.put("mail."+PROTOCOL_SMTP+".socketFactory.class", "javax.net.ssl.SSLSocketFactory");
				props.put("mail."+PROTOCOL_SMTP+".socketFactory.fallback", "false");
				props.put("mail."+PROTOCOL_SMTP+".quitwait", "false");
			} else {
				props.put("mail.transport.protocol", PROTOCOL_SMTP);
				props.put("mail."+PROTOCOL_SMTP+".host", mailServer.getHostname());
				props.put("mail."+PROTOCOL_SMTP+".port", mailServer.getPort());
				props.put("mail."+PROTOCOL_SMTP+".quitwait", "false");
			}

Open in new window

Omer-PitouAuthor Commented:
Thanks a lot
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.