Search code examples
xpageslotus-domino

XPages: sending mail to a mailing list


I am trying to send a mail to a large number of client with my XPages application, the application is supposed to create an save an email document then send out the mail to a specific mailing list.

but after sending 10 to 15mails the browser get a timeout and is end the process.

is there any workaround for this or is there any way to make it run on the server?


Solution

  • You need to decouple the browser response from the email sending process.

    I would create a bean in an application context. Inside the bean a Java thread to run in the background for mail sending and return the browser in the front thread. If you want to keep the UI updated you could use a web socket connection.

    Use this for more information: http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-one/