Skip to main content

A basic Gmail/SMS - XMPP transport.

Project description

The similarity between email addresses and XMPP JIDs is often noted in introductory texts to XMPP, and there have been claims that XMPP can serve as an email replacement (e.g. Google Wave). Weld takes the next step in merging email and XMPP systems.

Converting emails into XMPP stanzas is a complex issue due to the various MIME types, multipart emails, various headers, etc. Weld sidesteps that issue by assuming that content is treated the same way in emails as it is in XMPP message stanzas: a single, plain text message with an optional subject.

For example, an email such as:

Subject: Mapping an email to an XMPP message

Just some plain text content.

will be turned into an XMPP message like this:

<message to=""
  <subject>Mapping an email to an XMPP message</subject>
  <body>Just some plain text content.</body>

Weld converts email addresses to valid JIDs by replacing the @ character with the escape sequence \40 and using Weld’s JID as the domain part. For example, will be turned into example\ Messages sent to these JIDs will be sent as emails.

To make listening for new emails easier, Weld works with Gmail using Google’s new mail notification stanzas. A new XMPP client is created for each email address monitored by Weld to listen for the new message notice. The message is then retrieved via IMAP and converted into an XMPP stanza.

But Wait, There’s More!

Weld can also work as an SMS gateway by sending and receiving messages from special email addresses from wireless providers (see the full list). For example, Alltel users can send and receive text messages from In fact, getting this functionality was the whole point of creating Weld in the first place.


Weld depends on the latest SleekXMPP beta release.

Project details

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
weld-0.1.1.tar.gz (6.3 kB) Copy SHA256 hash SHA256 Source None Nov 7, 2010

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page