In this Sending Mail tutorial
http://code.google.com/appengine/docs/python/mail/sendingmail.html
it seems that
message.subject is missing.
Dev server throws "MissingSubjectError()"
Adding missing.subject = "hello" fixes the problem.
from google.appengine.api import mail
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import login_required
class InviteFriendHandler(webapp.RequestHandler):
@login_required
def post(self):
to_addr = self.request.get("friend_email")
if not mail.is_email_valid(to_addr):
# Return an error message...
pass
message = mail.EmailMessage()
message.sender = users.get_current_user().email()
message.to = to_addr
message.body = """
I've invited you to Example.com!
To accept this invitation, click the following link,
or copy and paste the URL into your browser's address
bar:
%s
""" % generate_invite_link(to_addr)
message.send()
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.