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 Thu, 24 Sep 2009 01:52:33 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frans,

On 9/23/2009 5:26 PM, Frans Thamura wrote:
>> 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.
> 
> our country internet connections is amazingly bad, so the connection
> usually on-off-on-off and this is amazingly annoying

Austria has horrible Internet connectivity? I don't buy it...

> we need a queue tips to make if i want to send 100 email, and after 20
> emails the connection lost

Connection to what? If you are connecting from your Java program to a
remove SMTP server, I would recommend against that. Instead, connect to
a local SMTP server that has a proper queue. Just install something like
postfix, exim, or even sendmail for that matter. JavaMail/commons-email
is not intended to be a fault-tolerant email queuing mechanism... it's
just for dumping SMTP messages onto a server.

> and of course i will use smtp server like postfix

The key is to use it locally. The SMTP server's queue will retry until
the message is sent (or a certain amount of time passes, which is
configurable).

> the system will be use web so anyone can create campaign to our customers email

If you are creating a web-based email management interface, I would
strongly encourage you to have a separate email thread (or, better yet,
an entirely separate program running periodically) running to send your
mail messages, rather than sending them ad-hoc during HTTP requests.

This will help you manage your own resources, since a batch-style
emailer program can serialize communications, etc. so that you don't
flood your SMTP server with connections, etc.

> i try to send directly from my dedicated server and got problem
> because before final success page arrived, the internet in my notebook
> lost

So, the Internet connection went down on your laptop? Are you running an
application server on your laptop that you expect others to use? Or is
this just a web-based interface that you are using personally, from your
laptop.

Are you just staging this thing on your laptop, and production will be
on a legitimate server? If so, I'd recommend running a staging server
with a reliable Internet connection, so that you don't have to worry
about your laptop's connection.

If you are looking for a solution that allows you to send emails to many
recipients directly from your laptop when Internet connectivity is...
intermittent, then I'd guess that you were a spammer jumping from access
point to access point attempting to steal Internet access from others. :(

> so i think that make a thread in the server, but how to know,
> that the email were succesfully sent.

If the SMTP server accepts the message for delivery, that's about all
you can do. If you have a *cough* legitimate "From" address, and there
is a problem, the remote SMTP server (mailer-daemon) should respond to
that email address with an error message (I'm sure you've seen these
kinds of things before).

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

iEYEARECAAYFAkq60OEACgkQ9CaO5/Lv0PAZOACfSrOeT6MhNfOyBDp9yfYjMNbP
5dsAn2i2JBvKsIx2m1+aFLezX4zN1Y+S
=mGwE
-----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