469,928 Members | 1,796 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,928 developers. It's quick & easy.

sending mail through python

rhitam30111985
112 100+
Hi all .. i am trying to do something really weird ...
here is my code :

Expand|Select|Wrap|Line Numbers
  1.  
  2. import os 
  3. os.system("mail -s test xxx@gmail.com asdaskdjkasdaasdad")
  4.  
  5.  
the problem is ... while sending email through shell .. u have to press CTRL +D after the message body is complete ... i have tried sending mail directly from my shell and it works perfectly fine ... . but i have been assigned to do the same thing in python .. how do i do the same action ie CTRL D in python ... . any help hugely appreciated .. i am using debian linux btw



regards
rhitam
Apr 9 '08 #1
1 1310
rhitam30111985
112 100+
never mind . figured it out .. :

Expand|Select|Wrap|Line Numbers
  1. import os 
  2. os.system("mail -s test xxx@gmail.com <<< ahahahahaaaaaa")
  3.  
Apr 9 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Gerhard Häring | last post: by
3 posts views Thread by Andrew McLean | last post: by
5 posts views Thread by Xah Lee | last post: by
reply views Thread by praba kar | last post: by
9 posts views Thread by Leo Breebaart | last post: by
4 posts views Thread by praba kar | last post: by
6 posts views Thread by Gary Kshepitzki | last post: by
4 posts views Thread by peter.jones.rpi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.