XML-RPC Spec for Email
Wed, Oct 13, 1999; by Dave Winer.
I wanted to get started with this now, take an easy first step, an interface for sending an email message. This is reasonably well-rehearsed. You can use the information in this document to RPC a message to a UserLand.Com server and have it sent as an email message.
There are two supported forms of email addresses:
elio@hometown.com and
elio@hometown.com (Elio Malatesta)
In this spec, where ever an email address is called for, you can supply a list of comma-separated email addresses. This follows the form of most email applications, and means that a single XML-RPC call can do the work of several calls.
An example of a comma-separated list:
elio@hometown.com,bull@mancuso.com (Bull Mancuso),davewiner@yahoo.com
By now you must be thinking that this kind of service could be abused by spammers. If that happens we will impose a limit of the number of emails that can be sent from a specific IP address per day. That would mean that the spammer would need to have a lot of machines to send a lot of mail, and if you're going to do that, why not run your own mail server?
Send your XML-RPC messages to: 206.204.24.2, port 80, path /RPC2.
For now this is the only UserLand server that's open to these calls. As we move forward we may open other servers. We want to mature the spec here and only here.
mail.send (recipient, subject, text, sender, cc, bcc, mimetype)
recipient, cc, and bcc are comma-separated lists of email addresses, as described above.
subject is a string, the subject of the message.
text contains the body of the message.
mimetype is a standard MIME type, for example, "text/plain".
Here's a Frontier sample script that sends email thru this interface:
local (server = "206.204.24.2", port = 80, procedure = "mail.send");
local (recipient = "dave@userland.com, davewiner@yahoo.com (Dave at Yahoo)");
local (subject = "Test Message sent at " + clock.now () + ".");
local (text = string.filledString ("123456789 ", 25));
local (sender = "bull@mancuso.com (Bull Mancuso)");
local (cc = "", bcc = "", mimetype = "text/plain");
local (params = {recipient, subject, text, sender, cc, bcc, mimetype});
betty.rpc.client (server, port, procedure, @params)
Edd Dumbill implemented the new email spec, in PHP, both client and server.
Here's the Frontier source code for the Mail-RPC server.
|