473,804 Members | 3,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

send email

Hello:

Could you tell me How I can send an email using WIN2000? What do I need?

Thanks
Jul 18 '05 #1
3 6274
"Alberto Vera" <av***@coes.org .pe> wrote in message news:<ma******* *************** ***********@pyt hon.org>...
Hello:

Could you tell me How I can send an email using WIN2000? What do I need?


Using Python, I supose...

http://www.python.org/doc/current/li...e-smtplib.html
--
David.
Jul 18 '05 #2
Your other option, assuming you don't mind Windows specific code, is to use the CDONTS COM library:

import win32com.client
def SendEmail(email Addresses, subject, body, files):

iConf = win32com.client .Dispatch("CDO. Configuration")
Flds = iConf.Fields
Flds("http://schemas.microso ft.com/cdo/configuration/smtpserver").Va lue = "someserver "
Flds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ).Value = 25
Flds("http://schemas.microso ft.com/cdo/configuration/sendusing").Val ue = 2 # cdoSendUsingPor t
# Authentication and stuff
Flds('http://schemas.microso ft.com/cdo/configuration/smtpauthenticat e').Value = 0 # No authentication
# The following fields are only used if the previous authentication value is set to 1 or 2
# Flds('http://schemas.microso ft.com/cdo/configuration/smtpaccountname ').Value = "user"
# Flds('http://schemas.microso ft.com/cdo/configuration/sendusername'). Value = "domain\\us er"
# Flds('http://schemas.microso ft.com/cdo/configuration/sendpassword'). Value = "password"
Flds.Update()
iMsg = win32com.client .Dispatch("CDO. Message")
iMsg.Configurat ion = iConf
iMsg.To = ";".join(emailA ddresses)
iMsg.From = "Test<te**@test .com>"
iMsg.Subject = subject
iMsg.TextBody = body
# The following assumes the files to be in the current directory
for file in files:
iMsg.AddAttachm ent("file:///" + os.getcwd() + "/" + file)
iMsg.Send()

Felix.

Hello:

Could you tell me How I can send an email using
WIN2000? What do I need?

Thanks

Jul 18 '05 #3
Alberto Vera wrote:
Hello:

Could you tell me How I can send an email using WIN2000? What do I need?

Thanks


Why don't you try the following:

##### start of script #######
from email.MIMEText import MIMEText
import smtplib

myVar = 'result of previous action'

body='''this text will become the body of the message
Using triple-quotes you can span it easily over multiple lines.
You can also add the value of variables in it: %s .
This can come in handy if you want to mail
the result of an action''' % (myVar)

msg = MIMEText(body)
From = "my***@myServer .net"
To = "wh************ *******@mydomai n.org"
CC = "so**********@m ydomain.org"
msg['From'] = From
msg['To'] = To
msg['Cc'] = CC
msg['Subject'] = "Don't leave me empty please"

server = smtplib.SMTP("m ailserver.mydom ain.org")
server.sendmail (From,[To,CC],msg.as_string( ))
server.quit

###### end of script #####

Jul 18 '05 #4

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

Similar topics

11
12094
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to use PHP to get inside an OWA (Microsoft Outlook Web Access) website to send email that way? The reason I ask is because my corporate office is going to do away with our rogue SMTP server access and force everything through Exchange
40
11908
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client
0
3713
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after days of reading posts and testing, I see it is not - unless I'm missing something? I'm not an email guru. All of my users will be running at least Windows 2000, most on XP sp2. Some of my users will have Outlook, many will be using Outlook...
9
4314
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5, VisualStudio2002, VB as programing language. Our test/development version of the web app as hosted on our "localhost" works fine; our "Default SMTP Virtual Server" is running (per the IIS console).
3
4560
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a windows application it worked fine, however I need to use a service as I don't want to rely on a user being logged in. The errors I get are: Index #:System.Web.HttpException: Could not access 'CDO.Message' object. --->...
14
9146
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my local default SMTP Server and my from address is a valid Yahoo/Hotmail address. I have configures the local SMTP Server to allow the IP Address 127.0.0.1.
8
7287
by: shapper | last post by:
Hello, I am trying to send an email using Asp.Net 2.0. I am getting the following error: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: No such user here at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify,
9
77445
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
2
5637
by: Malli mindwave | last post by:
Hi, We are using the yahoowebHostiing service for my company website, In that one screen of the SendComments/FeedBack section is there, I'm basically dot.net develeoper ,but yahoowebhosting not support .asp,.aspx files, it supports PHP files, I'm searching in JavaScript ,but not found any matter, I'don't Know PHP.I'm having lot of pressure of higer officials.Please help me on this.
5
2168
by: Mike | last post by:
I have a page with a textbox that a user can enter in mutliple email addresses such as: user1@yahoo.com;user2@yahoo.com;user3@gmail.com; and so on, I then have a foreach loop to get all of the emaill addresses and send emails out. the problem is that all of the email addresses the email is being sent to is showing in the section so everyone knows who's getting the email. How can I have 1 email address showing in the section so no...
0
9705
marktang
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...
0
9575
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,...
0
10320
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10073
tracyyun
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...
0
9134
agi2029
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...
0
6846
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2981
bsmnconsultancy
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.