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 = "husamal_ahmadi@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
Ken Tucker [MVP] - 31 Dec 2005 12:51 GMT
Hi,
You can use the mail message class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemwebmailmailmessageclasstopic.asp
http://dotnet.mvps.org/dotnet/faqs/?id=email&lang=en
Ken
------------------
> Hi EveryBody:
>
[quoted text clipped - 29 lines]
>
> regard's
Herfried K. Wagner [MVP] - 31 Dec 2005 13:23 GMT
"Husam" <Husam@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.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>