Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6815737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:50:33+00:00 2026-05-26T20:50:33+00:00

I’ve googled a lot on this and I dont know what I’m missing. I

  • 0

I’ve googled a lot on this and I dont know what I’m missing. I have a contact form so users can contact me:

contact.html

<form id="contact" action="" method="post" name="contact">
    <label for="subject">Subject:</label>
    <input id="id_subject" type="text" name="subject" maxlength="100">
    <label for="email">Email:</label>
    <input id="id_email" type="text" name="email">
    <label for="message">Message:</label>
    <textarea id="id_message" rows="10" cols="40" name="message"></textarea>
    <input type="submit" value="Submit">
</form>

app.yaml

inbound_services:
- mail    
- url: /_ah/mail/.+
  script: main.py
  login: admin

main.py

from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp import template
from google.appengine.api import mail
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler 

class Contact(webapp.RequestHandler):
    def get(self):  
        self.response.out.write(template.render('contact.html', {}))
    def post(self):
        sender = self.request.get("email")
        subject = self.request.get("subject")
        body = self.request.get("message")          
        message = mail.EmailMessage(sender=sender, subject=subject)
        message.to = "myemail@gmail.com"
        message.body = body
        message.send()

class LogSenderHandler(InboundMailHandler):
    def receive(self, mail_message):
        logging.info("Received a message from: " + mail_message.sender)

def main():
    application = webapp.WSGIApplication([('/contact', Contact),  
                                           LogSenderHandler.mapping()],
                                           debug=True)
    util.run_wsgi_app(application)

if __name__ == '__main__':
    main()

The class LogSenderHandler doesn’t work, the receive() requires an extra argument that i don’t know where to get. So I don’t comment it out when i deploy.
It’s a mess in my head. I don’t know how to put it together.
When I tried to email to myself I get this on my dashboard logs:

Unauthorized sender
Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 703, in __call__
    handler.post(*groups)
  File "/base/data/home/apps/s~projectname/1.354692671370598794/main.py", line 27, in post
    message.send()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/mail.py", line 894, in send
    raise ERROR_MAP[e.application_error](e.error_detail)
InvalidSenderError: Unauthorized sender

Could you help please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:50:34+00:00Added an answer on May 26, 2026 at 8:50 pm

    You can’t send through the email submitted on the form, since you aren’t authorized to use that email. You either have to use an email you control or the user’s email by connecting to their Google account. http://code.google.com/appengine/docs/python/mail/sendingmail.html This page says which email you can use to send emails from, just scroll down right after the first code block.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.