help with sending mail in Program

Discussion in 'Python' started by Ivan Shevanski, Jun 6, 2005.

  1. Hey i'm new here and relatively new to python. I've made a few small
    programs and now I'm making a program for my friends that at the end has a
    feedback form. I want to send the feedback back to my email adress. I know
    I should use the SMTP module and I have figured out how to send with it, but
    I can't figure out how to include my variables in it, such as the questions
    I ask them. Can someone explain this to me?
    -Ivan

    _________________________________________________________________
    On the road to retirement? Check out MSN Life Events for advice on how to
    get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
     
    Ivan Shevanski, Jun 6, 2005
    #1
    1. Advertising

  2. Ivan Shevanski

    Chris Curvey Guest

    Maybe you could give us a little more info about where you're getting
    messed up. The message body is just a string, so if you can build a
    string out of variables, you should be able to do it.
     
    Chris Curvey, Jun 7, 2005
    #2
    1. Advertising

  3. Ivan Shevanski

    Fuzzyman Guest

    Ivan Shevanski wrote:
    > Hey i'm new here and relatively new to python. I've made a few small
    > programs and now I'm making a program for my friends that at the end has a
    > feedback form. I want to send the feedback back to my email adress. I know
    > I should use the SMTP module and I have figured out how to send with it, but
    > I can't figure out how to include my variables in it, such as the questions
    > I ask them. Can someone explain this to me?
    > -Ivan
    >

    If you look at the cgiutils module at :
    http://www.voidspace.org.uk/python/recipebook.shtml

    It contains a couple of different functions for sending emails from
    Python. One using SMTP (either with a login or without), or using the
    sendmail program.

    You pass the body of the message to them as a string - so it will be
    easy enough to construct the string in the way you want.

    Regards,


    Fuzzy
    http://www.voidspace.org.uk/python


    > _________________________________________________________________
    > On the road to retirement? Check out MSN Life Events for advice on how to
    > get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
     
    Fuzzyman, Jun 7, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    55,565
  2. Ivan Shevanski

    Re: help with sending mail in Program

    Ivan Shevanski, Jun 7, 2005, in forum: Python
    Replies:
    5
    Views:
    311
    Kent Johnson
    Jun 9, 2005
  3. Ivan Shevanski

    Re: help with sending mail in Program

    Ivan Shevanski, Jun 16, 2005, in forum: Python
    Replies:
    1
    Views:
    335
    Dennis Lee Bieber
    Jun 16, 2005
  4. Replies:
    0
    Views:
    1,440
  5. Luke
    Replies:
    2
    Views:
    4,778
    Nigel Wade
    Mar 15, 2007
Loading...

Share This Page