473,385 Members | 1,402 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,385 software developers and data experts.

Howto start default mail application

Hello!

I have a single question. I was wondering how I can start the default mail
application (handler) with asp.net?

--
- Lars

Nov 17 '05 #1
5 1314
Refer to this link
http://www.asp.net/webmatrix/guidedt...ilsupport.aspx

HTH
Raja

"Lars Grøtteland" <lars@nospam> wrote in message
news:ON*************@TK2MSFTNGP11.phx.gbl...
Hello!

I have a single question. I was wondering how I can start the default mail
application (handler) with asp.net?

--
- Lars

Nov 17 '05 #2
Isn't it easyer to just open the default mail handler? I'm having problems
with the smtp

--
- Lars
"Raja Saravanan" <ra***********@hotmail.com> wrote in message
news:e3****************@TK2MSFTNGP12.phx.gbl...
Refer to this link
http://www.asp.net/webmatrix/guidedt...ilsupport.aspx

HTH
Raja

"Lars Grøtteland" <lars@nospam> wrote in message
news:ON*************@TK2MSFTNGP11.phx.gbl...
Hello!

I have a single question. I was wondering how I can start the default mail application (handler) with asp.net?

--
- Lars


Nov 17 '05 #3

I dont know exaclty what youre doing, as you didnt provide any code.
But what about a "mailto:" link?
Opening the client is something that youd need to be doing on the client
side, so why not do something like:

<a id="openMail" href="mailto:an*******@aserver.com"></a>
<script>
openMail.click()
</script>

I have tried it here, and it works fine. If you need it to open to a
specific address based on code, just do something like:

<a id="openMail" href="mailto:<%=TheMailAddress%>"></a>
<script>
openMail.click()
</script>

Of course, you can stick in all the other usual goodies on the link too,
like SUBJECT, CC, BCC, BODY or whate'r you may need.

Hope this helps.

Lars Grøtteland wrote:
Isn't it easyer to just open the default mail handler? I'm having problems
with the smtp


Nov 17 '05 #4
I'm not able to create a link. I know how it's done, but here is what I want
to do:

I have created a aspx page with an array inside it, telling me what the
email should be.
If array(1) it should be la**@nospam.bas.no.com
If array(2) it should be something else.
The asp page is receiving the input parameter, and I can see that the email
address is working fine. I receive the right mail address in the aspx page,
but the sending is more troublesome.
Can I use OnClick event? Or how can I do this?

--
- Lars
"Eidolon" <aa****@KILLSPAM.yahoo.com> wrote in message
news:Oa**************@TK2MSFTNGP10.phx.gbl...

I dont know exaclty what youre doing, as you didnt provide any code.
But what about a "mailto:" link?
Opening the client is something that youd need to be doing on the client
side, so why not do something like:

<a id="openMail" href="mailto:an*******@aserver.com"></a>
<script>
openMail.click()
</script>

I have tried it here, and it works fine. If you need it to open to a
specific address based on code, just do something like:

<a id="openMail" href="mailto:<%=TheMailAddress%>"></a>
<script>
openMail.click()
</script>

Of course, you can stick in all the other usual goodies on the link too,
like SUBJECT, CC, BCC, BODY or whate'r you may need.

Hope this helps.

Lars Grøtteland wrote:
Isn't it easyer to just open the default mail handler? I'm having problems with the smtp

Nov 17 '05 #5

I cant think of anyway that opening the client would be possible in
the VB/C# file, as that code runs on the server, not on the client,
which is where the mail client would reside.
If i may, why does the link not work for you? Because you dont want
the user to see it? Or because of the multiple possible emails? or?

Or are you trying to send the mail completely automated without any user
input for the body and such? In that case the System.Web.Mail way is the
only way i know, short of going out and finding yourself another library
to buy/download.

If its either of the first two objections though, the code below would
address both of those issues.

'// ===== BEGIN CODE ================================================== =

<%
Dim whichMail As String
If array(1) Then
whichMail = "la**@nospam.bas.no.com"
ElseIf array(2) Then
whichMail = "so*****@somewhere.com"
Else
whichMail = ""
End If

If whichMail <> "" Then
%>
<a id="doMail" href='mailto:<%=whichMail%>'
style="display: none;"></a>
<script>
doMail.click();
</script>
<% End If%>

'\\ ===== END CODE ================================================== ===

Lars Grøtteland wrote:
I'm not able to create a link. I know how it's done, but here is what I want
to do:

I have created a aspx page with an array inside it, telling me what the
email should be.
If array(1) it should be la**@nospam.bas.no.com
If array(2) it should be something else.
The asp page is receiving the input parameter, and I can see that the email
address is working fine. I receive the right mail address in the aspx page,
but the sending is more troublesome.
Can I use OnClick event? Or how can I do this?


Nov 17 '05 #6

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

Similar topics

4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
1
by: Gernot Hillier | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I'm the developer of a Linux ISDN application which uses embedded Python for controlling the communication. It starts several threads (i.e....
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
16
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
4
by: Wayne Wengert | last post by:
I am using a Sub (see below) to call the default mail application and pass a list of email addresses and a subject. Most of the time this works perfectly but occasionally I get an error ("System...
8
by: Topper | last post by:
Hello. I have simple web folders structure: -ROOT - BIN WebService.dll WebService.asmx I need to use my WebService.dll not in bin folder - for example, in ROOT. How do i this? How can i do...
6
by: Dushyant | last post by:
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...
1
by: amit.vasu | last post by:
Hi I have created a web serivces using .net framework 2.0. When I try to execute the web service I get the following error. Failed to start monitoring changes to 'e:\Default Web Site' because...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.