473,498 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.
Mar 3 '06 #1
6 1848
http://www.codeproject.com/vb/net/SendMail.asp

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

"Dushyant" <Du******@discussions.microsoft.com> wrote in message
news:2C**********************************@microsof t.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.

Mar 3 '06 #2
"Dushyant" <Du******@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/>

Mar 3 '06 #3
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" <Du******@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/>

Mar 6 '06 #4
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" <Du******@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.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" <Du******@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/>

Mar 6 '06 #5
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" <Du******@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.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" <Du******@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/>


Mar 7 '06 #6
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

"Dushyant" <Du******@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.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" <Du******@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.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" <Du******@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/>
>>
>>


Mar 7 '06 #7

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

Similar topics

4
2292
by: runningdog | last post by:
Hi Can someone point me to some documentation on how to create and send email from a win forms app using the defalt mail client TIA Steve
88
12311
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
3
18228
by: Gama Franco | last post by:
Hi, I'm working on a project based in Windows Forms, and I need to open the user's default e-mail client (a new e-mail) with some attachments ready to send. Since the destination of the e-mail...
1
12573
by: vijaygparikh | last post by:
HI i am writting a code for open default mail client and it works fine. i want to attach a file with the default mail client but file is not attached with "mailto:" option. If any one has idea...
2
12159
by: Robbie De Sutter | last post by:
Hello, How do I open a new, empty e-mail message from the default e-mail client whereby the sender is given and a file is attached? Currently I use the command (vb.net): ---...
2
10661
by: Landley | last post by:
Hello, Is there a way of creating an email, attaching a file and sending using the client's default mail client? I am looking for a none email client specific solution that does not involve...
11
2071
by: Dustin Davis | last post by:
(using VB.NET 2005) I'm writing a desktop application that I would like to have the ability to email files. I've set up the SMTP portion, now I would like to have a MAPI option. I found a...
2
31960
by: Hanika | last post by:
Going on 3 days and I am wodnering if I am just not looking in the right place. If anyone nows how to do this please please help me. I am developing a Windows form application using VB.NET 2005....
5
13297
by: Ben K | last post by:
I saw some posting some time ago regarding a "trick" to automatically pop up an email editor with attachment using the default mail client. It is basically using automation to do the following...
0
7125
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
7165
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
7203
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...
1
6885
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
7379
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
5462
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,...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
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...

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.