Home
The Toolkit for Online Communities
17506 Community Members, 0 members online, 2190 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : ns_sendmail replacement? : One Message

Forum OpenACS Q&A: Re: ns_sendmail replacement?

Collapse
Posted by Tilmann Singer on
I don't see a problem writing a service contract to send a single mail message. It would consist of a single function that accepts more or less the same arguments as ns_sendmail with a few additional ones, such as from_pretty_name etc.

This would imply creating a package for each implementation, like acs-mail-lite-qmail, acs-mail-lite-ns_sendmail etc., and configuring the implementation to use via the service contract binding UI, right?

I don't see an obvious solution for a service contract that does something like sending several different messages in a row, though, which would be necessary to enable an implementation that e.g. keeps an SMTP socket open in the background. Would it require to add something like a 'handle' that the caller has to open and specify when sending a mail? Or would it be possible to build a function that takes several mails at once as arguments - also as many as 15000? Would this require some upvar trickery, such as in the search service contracts?

What are the arguments against integrating separate transport implementations in acs-mail-lite directly? I guess there won't be more than 5 of them realistically. Initially maybe ns_sendmail, postfix and qmail - would that really be that unmaintainable?