473,597 Members | 2,364 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[Zope] how to send email witch attachment in python

Hello NG,

How can I send an email with an attachment from a python script?
My code so far:

mailhost = container.mailH ost
mMsg = 'MessageText'
mTo = 'y**@you.com'
mFrom = 'm*@me.com'
mSubj = 'Subject'

This code sends me an email with 'Subject' and 'MessageText' .
After googling and reading in different tutorials, I found a way to
implement it in dtml:

<dtml-sendmail smtphost="MailH ost">
To: yo*@you.com
From: Me me@me.com
Subject: <dtml-var "var1">
<dtml-mime type="text/plain" encode="7bit">
Hi, please take a look at my resume.
<dtml-boundary type="applicati on/octet-stream" disposition="at tachment"
encode="base64" filename_expr=" resume_file.get Id()"><dtml-var
expr="resume_fi le">
</dtml-sendmail>But how to do so in python only?Thanks alotChristian
Jul 18 '05 #1
1 2573
"Christian Otteneuer" <ch****@freenet .de> wrote in message news:<ck******* ****@news.uni-koblenz.de>...
Hello NG,

How can I send an email with an attachment from a python script?

If you want to send an email using Zope you are OT and you should ask
a Zope list; OTOH if you want to send an email from Python, just
use the email module and look at the documentation in the standard
library (especially the examples; they show how to do what you ask).

Michele Simionato
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: webmaster | last post by:
Hi, I'm desperatly trying to use Kinfxdb, but I have numerous segmentation faults, who lead my Zope to crash. It mostly occurs when I try to work with "date" fields (with an Informix Online database). I got it here : http://zope.org/Members/papa/ I'm running a RH7.3 Server, with the latest Informix SDK available on IBM website. Any idea ?
by: Joel Burton | last post by:
After a hiatus, a new group for Python, Zope, and Plone programmers in DC is forming. Our goal is to network and further educate ourselves on programming in Python. While not exclusively for Zope or Plone developers, we expect there to be a focus for these technologies. We have a formation meeting scheduled: Thursday, July 8th 7:00pm-9:00pm Porter Novelli Board Room, 1909 K Street NW.
by: Jochen Demuth | last post by:
Hi, I am trying to install ZWiki on Zope 2.5.1 / Debian 2.4.20-bf2.4-xfs. First I copied the contents of the ZWiki-0.32.0.tgz to the Products-directory under SOFTWARE_HOME: This is what it contained before: server1:/usr/lib/zope/lib/python/Products# ls ExternalMethod PageTemplates StandardCacheManagers ZSQLMethods Hotfix_2002-06-14 PluginIndexes TemporaryFolder ZopeTutorial
by: Joel Burton | last post by:
The newly-formed Zope/Python Users Group of DC announces our upcoming meeting schedule: Mo Jul 19: Zope -- presentation on Archetypes by Joel Burton Th Aug 5: Python -- no topic yet Mo Aug 16: Zope -- no topic yet Th Sep 2: Python -- no topic yet
by: john | last post by:
Hi I am developing a timesheet system. It will have 3 levels of access 1)Administrator 2)Approver -- Will approve or reject the timesheet filled by employees 3)Employees -- Fill in the timesheet which will ontain info like start time & end for task & task description. There will be different projects with different employees & approvers Also I need to genrate reports like timesheet for an employee for this particular week or month.Or...
by: jsmilan | last post by:
Hi, all; I'm strictly an amateur developer who has dabbled in a half dozen languages on eight or nine systems over 20 years or so. I have never devoted the time or energy to thoroughly learn any one of them, so I have become a true JOATAMON (Jack Of All Trades And Master Of None). I apologize in advance for any truly newb sounding questions. I did Google for this in several places first (Zope.org, Gentoo forums, and Google UseNet...
by: Unigroup of New York | last post by:
Content-Type: multipart/mixed; boundary="------------C465DF38DCB38DD2AF7117E0" Lines: 327 Date: Tue, 15 Feb 2005 23:36:38 -0500 NNTP-Posting-Host: X-Complaints-To: abuse@cv.net X-Trace: fe12.lga 1108528794 (Tue, 15 Feb 2005 21:39:54 MST) NNTP-Posting-Date: Tue, 15 Feb 2005 21:39:54 MST Xref: number1.nntp.dca.giganews.com comp.lang.python:398656
by: krzychu | last post by:
Hi, I have installed brand new platform - Zope-2-7-6, Python 2.4.1, Plone 2.0.5, OS Debian 1:3.3.6-2. After import a old Plone site from the following platform Zope-2-7-4, Python 2.3.3, Plone 2.0.3 to the new one, I get error when I visit PuthonScript in the ZMI. "invalid syntax (Script (Python), line 1)"
by: astarocean | last post by:
i'm using maildrophost to sendmail and wrote a script for it when the script is called directly from web request , a letter geneated with right things but when the script is called from json-rpc, the letter generated include a mess. see the file with this letter
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.