Question : Can Javamail  send all mails to  a plian text file excatly like mailq file

Hi,
   WE designed an eBroadcast system where we can personlize emails,  send emails and track the delivery status of each mail, but here my javamail program has to establish a connection with SMTP mail server and personalize email and send it to to  server. It's a bit timely process
So I want it to be very fast. So I need Javamail  send all mails to  a plian text file excatly like mailq file. Then I will transfer that file to our mail server and have mail server process all the mails from mailq file
   Can Java mail send mails to a file like mailq format locally

Thanks in advance

Answer : Can Javamail  send all mails to  a plian text file excatly like mailq file

I suggest you *strongly* to keep  "via SMTP submission" as long as possible.
It will allow to stay portable and switch to another MTA if the need arises.

* javamail can send via SMTP to non standard port (non 25)
* you can use inetd/xinetd to start "sendmail -bs -odd" on custom port TCP port and 127.0.0.1 interface
  -bs - accept SMTP session on STDIN/STDOUT
  -odd - deffered delivery mode - accept and put in queue with no DNS lookups
  You can also start script from inetd that will start queue run after servicing SMTP session:
    sendmail -q

The standard procedure for "overall" improvement is different.
It uses *multiple* (e.g. 50) parallel SMTP "injection" session and sendmail in "double interactive mode" - sendmail accepts next incoming message in single SMTP session after sending or queuening previous message (see sympa mailing list manager).

But you want to improve acceptance rate over *single* SMTP session.

Random Solutions  
 
programming4us programming4us