Home All Groups Group Topic Archive Search About

How to use my default mail client to mail any file?

Author
3 Mar 2006 10:23 AM
Dushyant
Hi all,

I am working on an application, which generate xml files. Now, I want to
send these xml files as attachments  to other persons using my default mail
client, like mozilla thunderbird. I want to send these files by just
specifying the mail address of the required person.

Author
3 Mar 2006 12:19 PM
vbnetdev
http://www.codeproject.com/vb/net/SendMail.asp

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



Show quote Hide quote
"Dushyant" <Dushy***@discussions.microsoft.com> wrote in message
news:2CB300BA-1CCA-40A0-A185-93342FA0A31E@microsoft.com...
> Hi all,
>
> I am working on an application, which generate xml files. Now, I want to
> send these xml files as attachments  to other persons using my default
> mail
> client, like mozilla thunderbird. I want to send these files by just
> specifying the mail address of the required person.
Author
3 Mar 2006 12:59 PM
Herfried K. Wagner [MVP]
"Dushyant" <Dushy***@discussions.microsoft.com> schrieb:
> I am working on an application, which generate xml files. Now, I want to
> send these xml files as attachments  to other persons using my default
> mail
> client, like mozilla thunderbird. I want to send these files by just
> specifying the mail address of the required person.

AFAIK there is no general solution which will work with all mail clients.
However, maybe using .NET's built-in mailing classes to send the mail is an
option (.NET 1.*: 'System.Web.Mail', .NET 2.0: 'System.Net.Mail').
Additional information:

<URL:http://www.systemwebmail.net/>
<URL:http://www.systemnetmail.net/>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
6 Mar 2006 7:17 AM
Dushyant
I tried this way by using System.Web namespace but the problem that I am
facing is that it does not take the mail server address by default. Every
time I have to mention my mail server's address whenever I want to send
mails. Is there anyway, by which it can automatically take mail server's
address.

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "Dushyant" <Dushy***@discussions.microsoft.com> schrieb:
> > I am working on an application, which generate xml files. Now, I want to
> > send these xml files as attachments  to other persons using my default
> > mail
> > client, like mozilla thunderbird. I want to send these files by just
> > specifying the mail address of the required person.
>
> AFAIK there is no general solution which will work with all mail clients.
> However, maybe using .NET's built-in mailing classes to send the mail is an
> option (.NET 1.*: 'System.Web.Mail', .NET 2.0: 'System.Net.Mail').
> Additional information:
>
> <URL:http://www.systemwebmail.net/>
> <URL:http://www.systemnetmail.net/>
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>
Author
6 Mar 2006 9:01 PM
vbnetdev
Hi Dush,

Are you using ASP.NET or WinForms?


--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



Show quoteHide quote
"Dushyant" <Dushy***@discussions.microsoft.com> wrote in message
news:8CBF56E0-61B6-4C58-8E3C-36593E534648@microsoft.com...
>I tried this way by using System.Web namespace but the problem that I am
> facing is that it does not take the mail server address by default. Every
> time I have to mention my mail server's address whenever I want to send
> mails. Is there anyway, by which it can automatically take mail server's
> address.
>
> "Herfried K. Wagner [MVP]" wrote:
>
>> "Dushyant" <Dushy***@discussions.microsoft.com> schrieb:
>> > I am working on an application, which generate xml files. Now, I want
>> > to
>> > send these xml files as attachments  to other persons using my default
>> > mail
>> > client, like mozilla thunderbird. I want to send these files by just
>> > specifying the mail address of the required person.
>>
>> AFAIK there is no general solution which will work with all mail clients.
>> However, maybe using .NET's built-in mailing classes to send the mail is
>> an
>> option (.NET 1.*: 'System.Web.Mail', .NET 2.0: 'System.Net.Mail').
>> Additional information:
>>
>> <URL:http://www.systemwebmail.net/>
>> <URL:http://www.systemnetmail.net/>
>>
>> --
>>  M S   Herfried K. Wagner
>> M V P  <URL:http://dotnet.mvps.org/>
>>  V B   <URL:http://classicvb.org/petition/>
>>
>>
Author
7 Mar 2006 4:03 AM
Dushyant
Hi,

I am using WinForms. I am sorry I should have mentioned it earlier. It's a
Windows application.


Show quoteHide quote
"vbnetdev" wrote:

> Hi Dush,
>
> Are you using ASP.NET or WinForms?
>
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> "Dushyant" <Dushy***@discussions.microsoft.com> wrote in message
> news:8CBF56E0-61B6-4C58-8E3C-36593E534648@microsoft.com...
> >I tried this way by using System.Web namespace but the problem that I am
> > facing is that it does not take the mail server address by default. Every
> > time I have to mention my mail server's address whenever I want to send
> > mails. Is there anyway, by which it can automatically take mail server's
> > address.
> >
> > "Herfried K. Wagner [MVP]" wrote:
> >
> >> "Dushyant" <Dushy***@discussions.microsoft.com> schrieb:
> >> > I am working on an application, which generate xml files. Now, I want
> >> > to
> >> > send these xml files as attachments  to other persons using my default
> >> > mail
> >> > client, like mozilla thunderbird. I want to send these files by just
> >> > specifying the mail address of the required person.
> >>
> >> AFAIK there is no general solution which will work with all mail clients.
> >> However, maybe using .NET's built-in mailing classes to send the mail is
> >> an
> >> option (.NET 1.*: 'System.Web.Mail', .NET 2.0: 'System.Net.Mail').
> >> Additional information:
> >>
> >> <URL:http://www.systemwebmail.net/>
> >> <URL:http://www.systemnetmail.net/>
> >>
> >> --
> >>  M S   Herfried K. Wagner
> >> M V P  <URL:http://dotnet.mvps.org/>
> >>  V B   <URL:http://classicvb.org/petition/>
> >>
> >>
>
>
>
Author
7 Mar 2006 12:55 PM
vbnetdev
best I could do.....

Dim regKey As RegistryKey
Dim sSmtpServer As String
Try
regKey = Registry.CurrentUser.OpenSubKey _
("Software\Microsoft\Internet Account Manager", False)
Dim sMailAccount As String _
= regKey.GetValue ("Default Mail Account")
regKey.Close()

regKey = Registry.CurrentUser.OpenSubKey _
("Software\Microsoft\Internet Account Manager" _
& "\Accounts\" & sMailAccount, False)
sSmtpServer = regKey.GetValue ("SMTP Server")

Catch ex As Exception
MsgBox(ex.ToString)
Finally
If Not regKey Is Nothing Then _
regKey.Close()
End Try

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



Show quoteHide quote
"Dushyant" <Dushy***@discussions.microsoft.com> wrote in message
news:108A8F77-2661-4EF8-8456-0288CD0947F3@microsoft.com...
> Hi,
>
> I am using WinForms. I am sorry I should have mentioned it earlier. It's a
> Windows application.
>
>
> "vbnetdev" wrote:
>
>> Hi Dush,
>>
>> Are you using ASP.NET or WinForms?
>>
>>
>> --
>> Get a powerful web, database, application, and email hosting with KJM
>> Solutions
>> http://www.kjmsolutions.com
>>
>>
>>
>> "Dushyant" <Dushy***@discussions.microsoft.com> wrote in message
>> news:8CBF56E0-61B6-4C58-8E3C-36593E534648@microsoft.com...
>> >I tried this way by using System.Web namespace but the problem that I am
>> > facing is that it does not take the mail server address by default.
>> > Every
>> > time I have to mention my mail server's address whenever I want to send
>> > mails. Is there anyway, by which it can automatically take mail
>> > server's
>> > address.
>> >
>> > "Herfried K. Wagner [MVP]" wrote:
>> >
>> >> "Dushyant" <Dushy***@discussions.microsoft.com> schrieb:
>> >> > I am working on an application, which generate xml files. Now, I
>> >> > want
>> >> > to
>> >> > send these xml files as attachments  to other persons using my
>> >> > default
>> >> > mail
>> >> > client, like mozilla thunderbird. I want to send these files by just
>> >> > specifying the mail address of the required person.
>> >>
>> >> AFAIK there is no general solution which will work with all mail
>> >> clients.
>> >> However, maybe using .NET's built-in mailing classes to send the mail
>> >> is
>> >> an
>> >> option (.NET 1.*: 'System.Web.Mail', .NET 2.0: 'System.Net.Mail').
>> >> Additional information:
>> >>
>> >> <URL:http://www.systemwebmail.net/>
>> >> <URL:http://www.systemnetmail.net/>
>> >>
>> >> --
>> >>  M S   Herfried K. Wagner
>> >> M V P  <URL:http://dotnet.mvps.org/>
>> >>  V B   <URL:http://classicvb.org/petition/>
>> >>
>> >>
>>
>>
>>