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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    56,023
  2. =?Utf-8?B?T3Bh?=

    Sending Mail via System.Net.Mail problem

    =?Utf-8?B?T3Bh?=, Jan 25, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    3,831
    sachya
    Jan 31, 2006
  3. =?ISO-8859-1?Q?Andr=E9s_Berenguer?=

    Sending e-mail with attachments with the default e-mail client

    =?ISO-8859-1?Q?Andr=E9s_Berenguer?=, Aug 29, 2003, in forum: Java
    Replies:
    0
    Views:
    649
    =?ISO-8859-1?Q?Andr=E9s_Berenguer?=
    Aug 29, 2003
  4. Ivan Shevanski

    Re: help with sending mail in Program

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

    Re: help with sending mail in Program

    Ivan Shevanski, Jun 16, 2005, in forum: Python
    Replies:
    1
    Views:
    394
    Dennis Lee Bieber
    Jun 16, 2005
  6. Replies:
    0
    Views:
    1,979
  7. Luke
    Replies:
    2
    Views:
    5,145
    Nigel Wade
    Mar 15, 2007
  8. Replies:
    2
    Views:
    4,789
Loading...