Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

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.

Release History

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
(6.3 kB) Copy SHA256 Hash SHA256
Source None Nov 7, 2010

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers