Skip to content
Browse files

A few fixes for normal email sending

  • Loading branch information...
1 parent 5c40cfe commit 1287ef8b8db16cf69aa27ad5681fb6434a273046 @maccman committed Mar 13, 2009
Showing with 5 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +2 −1 handler.py
  3. +1 −2 restful_email.rb
  4. +1 −0 restful_mailer.rb
View
1 .gitignore
@@ -0,0 +1 @@
+*.pyc
View
3 handler.py
@@ -1,5 +1,6 @@
import os
from main import users
+from google.appengine.ext import webapp
from sys import version_info
if version_info >= (2, 5):
@@ -55,7 +56,7 @@ def paramsFromXML(self):
doc = ElementTree.fromstring(self.request.body)
for child in doc.getchildren():
if child.tag in self.__class__.attributes:
- if child.getchildren()
+ if child.getchildren():
result[child.tag] = {}
for c in child.getchildren():
result[child.tag][c.tag] = c.text
View
3 restful_email.rb
@@ -1,6 +1,5 @@
require 'rubygems'
require 'activeresource'
-require 'actionmailer'
module RestfulEmail
class Email < ActiveResource::Base
@@ -24,6 +23,6 @@ def from=(d)
self.sender = d
end
- self.site = 'http://test:test@yourapp.appspot.com/'
+ self.site = 'http://test:test@localhost:8080/'
end
end
View
1 restful_mailer.rb
@@ -1,4 +1,5 @@
# ActionMailer::Base.delivery_method = :restful
+require 'actionmailer'
class ActionMailer::RestfulMailer < ActionMailer::Base
@@email_class = RestfulEmail::Email

0 comments on commit 1287ef8

Please sign in to comment.
Something went wrong with that request. Please try again.