473,714 Members | 2,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to lunch webpage without using SMTP server?

Hi, Guys,
Is there any other way to use python or mod_python writing a web page?
I mean, not use "form.py/email", no SMTP server.
<form action="form.py/email" method="POST"> ...

Thanks a lot.

Nancy W
Jul 18 '05 #1
21 3372
On 2004-07-21, Nancy <wx*****@hotmai l.com> wrote:
Is there any other way to use python or mod_python writing a web page?
I mean, not use "form.py/email", no SMTP server.
<form action="form.py/email" method="POST"> ...


I'm afraid your question make no sense.

SMTP is a mail-transfer protocol. It's got nothing to do with
webpages. Or with lunch. ;)

http://www.catb.org/~esr/faqs/smart-questions.html

--
Grant Edwards grante Yow! How's the wife? Is
at she at home enjoying
visi.com capitalism?
Jul 18 '05 #2
Grant Edwards wrote:
On 2004-07-21, Nancy <wx*****@hotmai l.com> wrote:

Is there any other way to use python or mod_python writing a web page?
I mean, not use "form.py/email", no SMTP server.
<form action="form.py/email" method="POST"> ...

I'm afraid your question make no sense.

SMTP is a mail-transfer protocol. It's got nothing to do with
webpages. Or with lunch. ;)

http://www.catb.org/~esr/faqs/smart-questions.html

I think she's trying to say: Is there away to send an email from a web
page without having a SMTP server. I believe a SMTP server (of
sometype) is required somewhere. That said maybe you can use
http://www.hare.demon.co.uk/pysmtp.html
John
Jul 18 '05 #3
On 2004-07-21, John fabiani <jf******@yolo. com> wrote:
On 2004-07-21, Nancy <wx*****@hotmai l.com> wrote:
Is there any other way to use python or mod_python writing a web page?
I mean, not use "form.py/email", no SMTP server.
<form action="form.py/email" method="POST"> ...
I'm afraid your question make no sense.

SMTP is a mail-transfer protocol. It's got nothing to do with
webpages. Or with lunch. ;)

http://www.catb.org/~esr/faqs/smart-questions.html


I think she's trying to say: Is there away to send an email
from a web page without having a SMTP server.


I'm afraid I don't quite know what it means to "send an e-mail
from a web page."
http://www.hare.demon.co.uk/pysmtp.html
Hmm, I don't see how you could use that to send an e-mail.
I believe a SMTP server (of sometype) is required somewhere.
That said maybe you can use


If what she's trying to do is send an e-mail from a Python
program (running as a CGI program or ASP handler, or Zope
something-or-other perhaps?), then what she needs is an SMTP
client module like the one implimented by
http://docs.python.org/lib/module-smtplib.html.

To use such an SMTP client, yes, you have to have an SMTP
server to which you can send the e-mail. There's not really
any way around that. SMTP is how e-mail is transferred on the
Internet, and to send an mail you need to connect to an SMTP
server.

You can't send mail with an SMTP server. The direction of
e-mail transfer in SMTP is client --> server. [Unless there
are SMTP extensions that allow bi-directional mail transfers?
I've never seen one in use...]

--
Grant Edwards grante Yow! My uncle Murray
at conquered Egypt in 53
visi.com B.C. And I can prove
it too!!
Jul 18 '05 #4
Nancy wrote:
Hi, Guys,
Is there any other way to use python or mod_python writing a web page?
I mean, not use "form.py/email", no SMTP server.
<form action="form.py/email" method="POST"> ...


So what you want is to be able to send email from a python script
running on your Windows computer, but you don't have access to an SMTP
server.
So you need to run your own SMTP server on your Windows computer. If
you want to do this for a real application, you should get a good SMTP
server (there are some free ones like blat or xmail).

But here are steps to run a crude SMTP server implemented in Python.

Download the two python files from http://www.hare.demon.co.uk/pysmtp.html

Download the zip file for the PyDNS module from
http://pydns.sourceforge.net/

You need to open a command window and install PyDNS. Run "python
setup.py install"

After you have installed PyDNS, then before you can run the SMTP server
you need to find out what DNS server your internet connection is using.
Go to control panel -> network. Click on your network connection, hit
the support tab and then click details to see what DNS servers you are
using. Copy one of them.

Then you can start the SMTP server in a command window. Run "pyspy.py
25 <dns server here>".

If it is running, then run this test script and see if you get the email:

import smtplib

SMTP_SERVER = "localhost"
FROMEMAIL = "wx*****@hotmai l.com"
TOEMAIL = "wx*****@hotmai l.com"

msg = """From: %s
Subject: test email
To: %s

This is a test message to %s
""" % (FROMEMAIL, TOEMAIL, TOEMAIL)

conn = smtplib.SMTP(SM TP_SERVER)
conn.sendmail(F ROMEMAIL, [TOEMAIL], msg)
conn.quit()
Jul 18 '05 #5
You need to open a command window and install PyDNS. Run "python
setup.py install"


And to help make using the command window easier, I'd recommend you
install the CmdHere Windows XP program from here:
http://www.microsoft.com/windowsxp/d...powertoys.mspx

That way, after you unzip pydns into a folder, you can just right-click
on the folder and choose "Open Command Window Here" and run the command.

If "python setup.py install" gives an error that python cannot be found,
try the full path: "\Python23\pyth on.exe setup.py install"
Jul 18 '05 #6
In article <ep************ ********@comcas t.com>,
Doug Holton <in****@spam.he re> wrote:
Nancy wrote:

Jul 18 '05 #7
Hi Nancy,

In order to be able to send an e-mail, you need to use either an SMTP
server or have the know-how skill to be able to route the message
yourself. I would HIGHLY recommend that you use an SMTP server.

Here's a code snipplet that you might find helpful:

def sendmessage(toa ddr, fromaddr, message):
server = smtplib.SMTP('m ail.some-server.com')
server.login("w e*******@some-server.com", "mySecretPasswo rd")
server.sendmail (fromaddr, toaddr, message)
server.quit()

You can use this function by doing the following:

sendmessage("by ***@somewhere.c om", "na***@anotherp lace.com", "Let's
have lunch someday via smtp! <grin>")

Hope this helps,

Byron
-----------------------

Nancy wrote:
Hi, Guys,
Is there any other way to use python or mod_python writing a web page?
I mean, not use "form.py/email", no SMTP server.
<form action="form.py/email" method="POST"> ...

Thanks a lot.

Nancy W

Jul 18 '05 #8
Cameron Laird wrote:
In article <ep************ ********@comcas t.com>,
Doug Holton <in****@spam.he re> wrote:
So what you want is to be able to send email from a python script
running on your Windows computer, but you don't have access to an SMTP
server.
So you need to run your own SMTP server on your Windows computer. If


.
.
.
No, you don't. If anything, as Grant Edwards points out elsewhere
in this thread you need SMTP *client* code--which is easy enough in
Python.


No, she does need to run her own SMTP server since she doesn't have
access to an existing one. You don't know the history of this thread.
Jul 18 '05 #9
Byron wrote:
Hi Nancy,

In order to be able to send an e-mail, you need to use either an SMTP
server or have the know-how skill to be able to route the message
yourself. I would HIGHLY recommend that you use an SMTP server.

Here's a code snipplet that you might find helpful:

def sendmessage(toa ddr, fromaddr, message):
server = smtplib.SMTP('m ail.some-server.com')
server.login("w e*******@some-server.com", "mySecretPasswo rd")
server.sendmail (fromaddr, toaddr, message)
server.quit()


Again, we've been through all this before. She doesn't have access to
an SMTP server, apparently. She only uses hotmail.
That is why I answered her with instructions on how to run her own SMTP
server just for testing purposes.
Jul 18 '05 #10

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

Similar topics

4
15526
by: James | last post by:
How can I take my form data and send it as an email using my SMTP server located @ my ISP using PHP ? my form has several fields: TO: this is a drop down list FROM: this is a drop down list SUBJECT: Free Type
1
1504
by: Ken Fine | last post by:
Is it possible to set up server-side mail services such that when someone e-mails to a certain address, the contents attached to that mail are processed and the processed content is returned to the user, again, as an attachment? I installed a server-side component for managing graphics. "Wouldn't it be nice," thought I, "if untutored staff could email graphics to a certain e-mail address to have them resized and returned to them.") I...
1
1913
by: dave | last post by:
hi guys I m trying to execute few lines code tht i have copies from microsoft tech script centre. basically its to send email without using any smtp service. u can find the code snippet from following link. http://www.microsoft.com/technet/community/scriptcenter/en tscr/scrent16.mspx while executing this code in vbs file i was getting error:
2
8693
by: New User | last post by:
Hi, I have a PDF file that I am trying to send as an attachment through a C# program. Even though the PDF file can be opened by itself, sometimes the same file cannot be opened as an attachment. If I try and open the original PDF file I have no problems. I have used System.Web.Mail.MailMessage to create an email and an SMTPMail object to send the mail.
5
1473
by: trevisc | last post by:
Good afternoon everyone. I'm currently trying to build an automated invoice system that collects dynamic data and automatically sends out invoices. In my test database I have 23 companies that i'm trying to send out. I am currently using Web.Mail.MailMessage with my cable internet SMTP as the server to send out to. I've noticed that if I just run it straight through it will time out (almost like the server detects it's being over...
0
8796
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
8704
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
9170
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
9009
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
7946
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
5943
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
4462
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2514
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2105
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.