473,473 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Temporary SMTP Server

I have a program that runs a second program with the following code:

Dim process As New Process()
Dim FileName As String = "externalprog.exe"
Dim Arguments As String

Arguments = "/c"
process.StartInfo.UseShellExecute = False
process.StartInfo.RedirectStandardOutput = True
process.StartInfo.RedirectStandardError = True
process.StartInfo.CreateNoWindow = True
process.StartInfo.FileName = FileName
process.StartInfo.Arguments = Arguments
process.StartInfo.WorkingDirectory = Application.StartupPath
process.Start()
Return process.StandardOutput.ReadToEnd()

The advanatge to running my code like this is I can read the output from the
dos prompt.

The problem is this external program does log any data if the process fails
but it does send an email. I am wondering if there is a way to have my
program that runs this one act as a temporary smtp server and recieve the
email the external program sends and then read the error out of the body of
the email? If possible this would have to work on a server that currently
has a smtp server runing.

Thanks!

Sep 22 '06 #1
1 2037
Hi Joey,

Firstly I would like to understand the scenario.

1. The code your provide is to redirect the output of the externalprog.exe
program.

That is to say, e.g. the externalprog.exe is running in DOS mode(Console),
we can capture the output in the Console.

2. The problem is this external program does log any data if the process
fails
but it does send an email. I am wondering if there is a way to have my
program that runs this one act as a temporary smtp server and recieve the
email the external program sends and then read the error out of the body of
the email? If possible this would have to work on a server that currently
has a smtp server runing.

When fails, the externalprog.exe will send an mail, and you will want to
capture the content.
So how did the externalprog.exe to send an mail?
If the externalprog.exe will connect to certain SMTP server and send an
mail, then we can not capture the mail via redirect output.
As I pointed before, the redirect output function is used to capture the
output. e.g. what we will see in the Console(DOS window).

If I misunderstood, please feel free to let me know.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 25 '06 #2

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

Similar topics

2
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
7
by: Nancy | last post by:
Hi, Is there any one knows, if I want to use mod_python to handle my html form, I must have a SMTP server on my PC(winxp pro)? Where can I get a free SMTP server? I cann't follow mod_python's...
21
by: Nancy | last post by:
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. ...
2
by: David | last post by:
Hi Group, I'm having a few problems with getting an SMTP server configured on my Windows 2000 Server web server. My web server is co-located at my hosts and i use VNC to remotely access the web...
15
by: Steven Burn | last post by:
My server has POP but only has SMTP if sending to my domain, and not other domains (such as hotmail). I'm therefore wondering, if anyone knows of any scripts etc, that will allow me to have a sort...
3
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us” page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email...
1
by: bivin | last post by:
hai i am requesting your technical support. please help me. i have been working with this for five days. the problem is relating with the smtp. i am trying to send an email from the asp.net...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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 projectplanning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.