473,395 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

From ShellExcute to Process.Start..

Hi EveryBody:

Two days ago I post a question about how can I use ShellExcute function in
sending e-mail file ?

I got to Helpfull replayment from Mr.Mattias and Mr.Herfried K. Wagner

which telling me that I can use System.Diagnostics.Process instaed of
ShellExcute Function ?

I read About that mant articals Until I come up with this code:

Dim myProcess As New Process
Dim toEmail As String = "hu************@yahoo.com"
Dim subject As String = "This is a test Subject"
Dim body As String = "This is a test email message"
Dim message As String =
String.Format("mailto:{0}?subject={1}&body={2}", toEmail, subject, body)
myProcess.StartInfo.Verb = "Send"
myProcess.StartInfo.CreateNoWindow = True
myProcess.Start(message)

But still this code will lanch the default e-mail sender which is in my case
OutLook.

So my questioj is, Can I any one help me and direct me in adjusting this
code and make it send e-mail with out depending on any program such as
Outlook ?

Any help or redirections will be completlly appreciated

regard's

Dec 31 '05 #1
2 1325
Hi,

You can use the mail message class

http://msdn.microsoft.com/library/de...classtopic.asp

http://dotnet.mvps.org/dotnet/faqs/?id=email&lang=en

Ken
------------------
"Husam" <Hu***@discussions.microsoft.com> wrote in message
news:4B**********************************@microsof t.com...
Hi EveryBody:

Two days ago I post a question about how can I use ShellExcute function in
sending e-mail file ?

I got to Helpfull replayment from Mr.Mattias and Mr.Herfried K. Wagner

which telling me that I can use System.Diagnostics.Process instaed of
ShellExcute Function ?

I read About that mant articals Until I come up with this code:

Dim myProcess As New Process
Dim toEmail As String = "hu************@yahoo.com"
Dim subject As String = "This is a test Subject"
Dim body As String = "This is a test email message"
Dim message As String =
String.Format("mailto:{0}?subject={1}&body={2}", toEmail, subject, body)
myProcess.StartInfo.Verb = "Send"
myProcess.StartInfo.CreateNoWindow = True
myProcess.Start(message)

But still this code will lanch the default e-mail sender which is in my
case
OutLook.

So my questioj is, Can I any one help me and direct me in adjusting this
code and make it send e-mail with out depending on any program such as
Outlook ?

Any help or redirections will be completlly appreciated

regard's

Dec 31 '05 #2
"Husam" <Hu***@discussions.microsoft.com> schrieb:
So my questioj is, Can I any one help me and direct me in adjusting this
code and make it send e-mail with out depending on any program such as
Outlook ?


Use 'System.Web.Mail' in .NET 1.0/1.1 or 'System.Net.Mail' in .NET 2.0.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Dec 31 '05 #3

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

Similar topics

1
by: Marc | last post by:
I want to write a C#/ASP.NET application where a user can go to a web page, start running a job, close their browser, and then come back later and see the results. The purpose for this application is...
12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
6
by: Dmitri Shvetsov | last post by:
Hi, Can I start an external process from the Web Service? I'm using a code, compiler keeps silence, compiles ok and starts the project. When I trace in Debugger it doesn't start an external...
12
by: John F. | last post by:
Here is my code; Dim psi As New System.Diagnostics.ProcessStartInfo psi.UseShellExecute = True psi.FileName = "C:\WinProg.exe" System.Diagnostics.Process.Start(psi) Have tested WinProg.exe...
2
by: Husam | last post by:
Hi EveryBody: I have two questions : Is there any need to use RuneShellExcute sub with ShellExcute function or not ? Also How I use the ShellExcute function to open file or send e-mail ?
6
by: ludwig.stuyck | last post by:
Hi all, I need to start an executable from within a windows service. I tried the following code in the windows service: ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName =...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I have a C# application in which I start another process which produces output to stdout and stderr. In fact, that process is the uSoft VS2005 C/C++ compiler itself! I would like to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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...

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.