commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Send multiple email
Date Wed, 23 Sep 2009 19:17:55 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frans,

On 9/22/2009 6:12 PM, Frans Thamura wrote:
> but i want to create a campaign program and one email send to 100 email user

100 recipients is not very many. What's wrong with just calling
message.addTo() or addCC() or addBCC() over and over, and then sending
the message a single time?

> i love the [mass] mailer concept, but it is stand alone, i want the
> server side mechanism

Exactly what server-side mechanism do you want? Do you want a Java-based
SMTP server like James (http://james.apache.org/)?

Or do you just want to send a ton of email? Sending lots of email is not
a problem whatsoever for commons-email (or JavaMail itself, which
commons-email wraps).

> how to handle the sending process in background must i use like quartz
> that send every mail,

If you want to send email in the "background", what is running in the
"foreground"? Are you talking about adding email-sending capabilities to
a web or GUI app or something like that? Unless you are sending /lots/
of emails, the process of sending a message to an SMTP server is
exceedingly fast: you probably don't need any background processing at all.

> how the thread management work, and what happen if the email is failed
> or exception handling.. esp for sending more than 100 email, and how
> the engine is not make the tomcat crash, i prefer to make dedicated
> container for mass mailer concept

Are you intending to send messages through a single smart host or SMTP
server, or do you expect your software to direct-connect with the mail
exchangers (MXs) for each of your recipients?

I ask because multi-threading is probably not useful if you are going to
use a smart host: you should just connect and send all the messages at
once, and then let your smart host's queue take care of threading. Your
smart host might even reject multiple simultaneous connections, removing
any benefit from multi-threading.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkq6dGMACgkQ9CaO5/Lv0PDH7ACeI9p1up0Kq++l//ESIUPFyrX7
Q/cAn0yZWOLgS6sJC3QMOkXFCOXyw3fS
=h0uT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message