Email

R

Rohan

I was wondering if there could be an arrangement where a file could be
attached and send as an email.
For ex
f = open(add.txt,w)
f.write('python')
f.close()

Now I would like to send an email with add.txt as an attachment, is it
possible ?
some one give me a pointer towards this.
 
K

kyosohma

I was wondering if there could be an arrangement where a file could be
attached and send as an email.
For ex
f = open(add.txt,w)
f.write('python')
f.close()

Now I would like to send an email with add.txt as an attachment, is it
possible ?
some one give me a pointer towards this.

Try looking up the email module.

http://docs.python.org/lib/node162.html

Mike
 
L

Laurent Pointal

Rohan said:
I was wondering if there could be an arrangement where a file could be
attached and send as an email.
For ex
f = open(add.txt,w)
f.write('python')
f.close()

Now I would like to send an email with add.txt as an attachment, is it
possible ?
some one give me a pointer towards this.

You can use iMailer as an example script to get parts:

http://nojhan.free.fr/article.php3?id_article=22

A+

Laurent.
 
R

Rohan

Did you try Google translate? Here is the tiny url of the page you
wanted translatedhttp://tinyurl.com/3xlcmc

Thanks everyone,
I'm able to write a script which reads the file and puts it in the
message. I would like to attach the file is it possible?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top