Visual C

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDesktop ProgrammingVisual C

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 3.00 average. Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old August 22nd, 2004, 09:10 PM
r2b2 r2b2 is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 r2b2 New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
attach pdf file to email message

newbie to programming!
I have this simple email program below. it works and will attach a text document but i need to be able to attach a pdf file.

rom email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEImage import MIMEImage
#from email.MIMEMultipart import MIMEMultipart
fp=open("c:\document.pdf","rb")
msg=MIMEMultipart("this is a test")
body=MIMEText(fp.read())
fp.close()
msg.attach(body)


import smtplib
s=smtplib.SMTP('mail.com')
#s.connect(host=mail..com,port=25)
s.sendmail('mail@aol.com',msg.as_string())
s.close()

Reply With Quote
  #2  
Old January 25th, 2011, 04:39 AM
spoortheilets spoortheilets is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jan 2011
Location: Ghana
Posts: 2 spoortheilets User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 2 sec
Reputation Power: 0
Send a message via ICQ to spoortheilets
hollaa

hi guys

Reply With Quote
Reply

Viewing: Tutorialized ForumsDesktop ProgrammingVisual C > attach pdf file to email message


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap