text:
[16797] Tim Bower
Member: 86 months
Authored: 8 videos
Description: Assistant Professor Computer Systems Technology Kansas State University at Salina `Tim Bower <http://www.sal.ksu.edu/faculty/tim/>`_ My blog: `Open Source on the Prairie <http://prairiepy.blogspot.com/>`_ ...
Testing a Program that Sends E-mail with the Fakemail Server [ID:1551] (4/4)
in series: Python Network Programming
video tutorial by Tim Bower, added 07/09
[16797] Tim Bower
Member: 86 months
Authored: 8 videos
Description: Assistant Professor Computer Systems Technology Kansas State University at Salina `Tim Bower <http://www.sal.ksu.edu/faculty/tim/>`_ My blog: `Open Source on the Prairie <http://prairi ...
Our authors tell us that feedback from you is a big motivator. Please take a few moments to let them know what you think of their work.
This video demonstrated how you can use the Fakemail e-mail server for testing purposes while developing a program that sends e-mail messages.
Fakemail was written by Graham Ashton and the project's home page is hosted on Source Forge.
In addition, the video also shows the use of Python's email.MIMEText module to build a simple message and shows sending the message with sockets according to the SMTP protocol. You will want to use the smtplib module to send e-mail messages, instead of doing it your self with sockets. I use sockets in the video just to demonstrate the SMTP protocol conversation between the client and server.
For more information about Python network programming, see my Network Programming Study Guide
from email.MIMEText import MIMEText from email import Utils import socket def send_recv(sock, msg): print msg sock.send(msg+'\r\n') try: r = sock.recv(1024) print r except socket.timeout, e: print "Socket Timeout - %s\n" % str(e) def smtpSocket(server, domain, msg): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.settimeout(5) try: s.connect(server) r = s.recv(1024) print r except socket.timeout, e: print "Socket Timeout - %s\n" % str(e) return send_recv(s,'HELO ' + domain) mFrom = "MAIL From:<%s>" % msg['From'] send_recv(s, mFrom) mRcpt = "RCPT To:<%s>" % msg['To'] send_recv(s, mRcpt) send_recv(s, 'DATA') send_recv(s, msg.as_string()+'\r\n.') send_recv(s, 'QUIT') s.close() message = """Hello, This is a test message. -- Tim""" msg = MIMEText(message) msg['To'] = 'you@home' msg['From'] = 'me@school' msg['Subject'] = 'Testing Python e-mail' msg['Date'] = Utils.formatdate(localtime = 1) msg['Message-ID'] = Utils.make_msgid() server = ('localhost', 8025) domain = 'localhost' ##server = ('postman.sal.ksu.edu', 25) #domain = 'sal.ksu.edu' smtpSocket(server, domain, msg)
Got any questions?
Get answers in the ShowMeDo Learners Google Group.
Video statistics:
- Video's rank shown in the most popular listing
- Video plays: 25 (since July 30th)
- Plays in last week: 2
- Published: 85 months ago
Thank-yous, questions and comments
If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?
You may also want to see our ShowMeDo Google Group to speak to our active users and authors.
All comments excluding tick-boxed quick-comments
Thanks for the valuable stuff. Its very helpful to increase the knowledge.


text:
Lenny Kravitz Says Paris Attacks 'Hit a Chord' With Him, But Warns They Could Happen Anywhere
The musician-actor also stresses the reaction should not just be "pray for Paris" — it should be "pray for the world."By Sean Fitz-Gerald
The musician-actor also stresses the reaction should not just be "pray for Paris" — it should be "pray for the world."By Sean Fitz-Gerald
It involved crystals.By Ashley Weatherford
We all saw it. But how well do we really know it?By Allison P. Davis
A NSFW narrative of freedom.By Allison P. Davis
Good job, Katy!By Lindsey Weber
Rock and roll.By E. Alex Jung
Model BFFs, a Bieber-Lagerfeld summit, and snacks!By Véronique Hyland
1998: a time when Spice Girls, Radiohead, and Cherry Poppin' Daddies could coexist at the top of the charts.By Lauren Schwartzberg
Growing Up Kravitz.By Maggie Lange
The caveman look.By Erica Schwiegershausen
Sadly, not all in the same place at the same time.By The Cut
People are saving the big guns for Paris.By YoungJun Koo
Sparkly, "tribal."By Charlotte Cowles
Now this is how you enjoy being single.By Kat Stoeffel
In a movie.By Jesse David Fox
"She's still hot — very hot."By Nisha Gopalan
The veteran jewelry designer talks about her new massive, metal-filled art installation.By Ally Betker
Oprah serves up some Cruella de Vil realness.By Eliot Glazer
Also, Warby Parker is getting its first store.
"I was on Glee, I was on The Simpsons, now I'm in The Hunger Games. I'm getting my kid cred!By Kyle Buchanan

subset: commoncrawl


text:
Video Industry News Video Company News Technology Industry News Technology Company News Novelty Industry News Novelty Company News Gay Industry News Gay Company News Legal Industry News All Company News
Released: Jun 01st, 2005
Running Time: 140
Director: Su
Company: Anabolic Video Productions
Cast: Jayna Oso, Mandingo, Chanel Chavez, Nat Turnher, Jada Fire, Chiquita Lopez, Ariana Jollee, Brian Pumper, Vanessa Mae, Lili (I), Sandra Romaiu, Mr. Marcus
Critical Rating: AAA 1/2
Genre: All-Sex
Stock multiples in your ass section.
This production starts off a little slow, but by the time we get to the anal wonders of Jayna Oso, you won't care. She's got this juicy butt and a greedy hole that gets banged hard. Real hard. And she likes it. To make it even hotter, she'd joined by Jada Fire. What a team!
Little Chanel Chavez is the next treat. The petite Latina takes a tagteam from Brian Pumper and Mr. Marcus with this faraway blessed-out look in her eyes as she's d.p.'d. Then Lilli and Marcus have a thing, violent and wanton.
Overall, it's good stuff, loads of ass-pumping fun. Heck, even the bonus footage is hot. Pre-nom for Best Anal-Themed Series.


text:
Charming Czech doll Caprice strip
Viewed: 1554 Duration: 5:38 Added: June 2013 Download Flag Video
Thank you for your vote!
You have already voted for this video!
Charming Czech doll Caprice stripSorry, there is no description for this video
From: lucycute
Category: Babes
User Comments
Thank you! Your comment has been sent for review.
Unexpected error occurred, please contact support


text:
ARLINGTON -- Texas right-hander Sidney Ponson was designated for assignment in a surprise move before tonight's game against the Tampa Bay Rays.
That opened a roster spot for Vicente Padilla to start tonight for Texas.
Padilla was reinstated from bereavement leave. He'd been in his
native Nicaragua since Sunday to attend to a personal family matter
-- missing one start.
Texas general manager Jon Daniels was vague about Ponson, saying he'd been dumped, quote: "for disrespecting teammates and club
Texas has ten days to trade, release or outright Ponson to the
Daniels said Ponson had done nothing illegal and hadn't violated
any club rules.
The Rangers signed Ponson as a minor league free agent on March
10th, and the 31-year-old Aruba native began the season with
Triple-A Oklahoma.
He was called up by the Rangers on April 26th. He went 4-1 with
a 3.88 ERA.