XML-RPC.ComUserLand
    Simple cross-platform distributed computing, based on the standards of the Internet.

Home

Spec

News

Mail List

Directory

Discuss

New Topic

HowTo

Top 50

SOAP

RSS

OPML

XML




Members
Join Now
Login

XML-RPC Spec for Email

Wed, Oct 13, 1999; by Dave Winer.

Overview

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.

Email addresses

There are two supported forms of email addresses:

elio@hometown.com and

elio@hometown.com (Elio Malatesta)

Comma-separated lists of email addresses

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

We are anti-spam

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?

Our server is running

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.

Sending mail

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".

Sample code

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)

PHP Implementation

Edd Dumbill implemented the new email spec, in PHP, both client and server.

Frontier implementation

Here's the Frontier source code for the Mail-RPC server.

© Copyright 2004-2009 Scripting News, Inc.
© Copyright 1998-2004 UserLand Software, Inc.
XML-RPC is a trademark of UserLand Software, Inc.
Last update: Thursday, October 14, 1999 at 7:23:26 PM Pacific.

Create your own Manila site in minutes. Everyone's doing it!