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

  • Home
  • SEARCH
  • 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 1041391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:20:45+00:00 2026-05-16T15:20:45+00:00

How could I send an e-mail from my Python script that is being run

  • 0

How could I send an e-mail from my Python script that is being run on “Google App Engines“ to one of my mail boxes?

I am just a beginner and I have never tried sending a message from a Python script. I have found this script (IN THIS TUTORIAL):alt text

Here is the same script as a quote:


import sys, smtplib

fromaddr = raw_input("From: ")
toaddr = string.splitfields(raw_input("To: "), ',')
print "Enter message, end with ^D:"
msg = ''
while 1:
    line = sys.stdin.readline()
    if not line:
        break
    msg = msg + line

# The actual mail send
server = smtplib.SMTP('localhost')
server.sendmail(fromaddr, toaddrs, msg)
server.quit()

but I hardly understand how I could have this script run from “Google App Engine”:

1) Firstly, I don’t quite understand what e-mail address I need to place right after From: in this line:


fromaddr = raw_input("From: ")

Can I just place here any e-mail address of any e-mail boxes that I have?

2) Secondly, let’s say I want to send a message to this e-mail address of mine brilliant@yahoo.com . Then the next line, I guess, must look this way:


toaddr = string.splitfields(raw_input("To: brilliant@yahoo.com"), ',')

Is this right?

3) Thirdly, let’s say, the message that I want to send will be this sentence: Cats cannot fly! Then, I guess, the line that starts with msg = must look this way:


msg = 'Cats cannot fly!'

Is this correct?

4) If I upload this script as an application to “GAE”, how often will it be sending this message to my mail box? Will it send this message to me only once or it will be sending it to me every second all the time until I delete the application? (This is why I haven’t tried uploading this script so far)

Thank You all in advance for Your time and patience.

  • 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-16T15:20:46+00:00Added an answer on May 16, 2026 at 3:20 pm

    Sure – just use the Mail API as outlined in the docs:

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

Sidebar

Ask A Question

Stats

  • Questions 541k
  • Answers 541k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the manipulator flag std::right Example or This works... #include<iostream>… May 17, 2026 at 2:47 am
  • Editorial Team
    Editorial Team added an answer Create an auxiliary calendar table containing every date and outer… May 17, 2026 at 2:47 am
  • Editorial Team
    Editorial Team added an answer Although it certainly can be done with metaclasses, you can… May 17, 2026 at 2:47 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I could send mail from my Activity when i have already configured with any
Im trying to send a mail from a asp.net script, but im getting this
I'm learning Python as my second programming language (my first real one if you
I am writing a function to send a mail to specific user? What I
I am trying to send mail through grails mail plugin. I configured according to
How could I create a macro that would check each cell of column A,
We have a console application (currently .NET) that sends out mail in bulk to
Preferably using a scripting language like Perl or Python, but if I have to
I am working on a project where one of the requirements is to re-write
can anyone tell me how could i create a down loadable link for my

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.