Skip to content

Commit

Permalink
[server] added encoding so emails actually work
Browse files Browse the repository at this point in the history
  • Loading branch information
dscape committed Sep 13, 2011
1 parent d1f47b3 commit 9c01a81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if you like you can use a service like [nodejitsu] or [no.de] to host your servi

just point your `cloudmailin` account to `http://cloudmailin.no.de`. now visit `http://cloudmailin.no.de` and follow the instructions.

after subscribing send an email to your cloudmailin email address and see the curl appear.
after subscribing send an email to your `cloudmailin` email address and see the curl appear.

# roadmap, bugs

Expand Down
3 changes: 2 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ app.listen(cfg.port);
// , "to": "282f057bb3b492d36e03@cloudmailin.net"}
function email_route(request, response) {
var parsed = request.body
, email_address = parsed.to
, email_address = encodeURIComponent(parsed.to)
, subscribers = channels[email_address]
;

Expand All @@ -45,6 +45,7 @@ function connect_hook (channel_name) {
io.sockets
.on('connection', function(socket) {
socket.on('subscribe', function(channel_name,cb) {
channel_name = encodeURIComponent(channel_name);
var channel = io
.of('/' + channel_name)
.on('connection', connect_hook(channel_name));
Expand Down

0 comments on commit 9c01a81

Please sign in to comment.