By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,978 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,978 IT Pros & Developers. It's quick & easy.

How to add a Microsoft Outlook Email from ASP.NET application

P: n/a
Is there a way to create an New Outlook Email from an ASP.NET
application? I can not use "mailto:", since it is only support a
string less than 512. I have find a good way from link :
http://zones.advisor.com/doc/17330 , that thread show how to create a
new appointment instead of email. but I have no idea about the format
of a new email. Does any one know the format of a new outlook email
i.e.
Response.ContentType = "text/XXXXXX"
Response.AppendHeader("content-disposition", "inline;
filename=oneEmail.XXXXX")

and the body of the file

Thanks

Lu

Feb 28 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
<xi********@gmail.comwrote in message
news:11**********************@t69g2000cwt.googlegr oups.com...
I can not use "mailto:", since it is only support a string less than 512.
Are you simply trying to send an email from ASP.NET, or do you actually need
interaction from the users...?
Feb 28 '07 #2

P: n/a
You wouldn't do what you are asking in an ASP.NET application at all.

An ASP.NET application's code runs on the server, not the client (where an
email client would be located) so there's no way to have server-side code
launch a client-side application.

Since users can use any client (browser) to utilize your ASP.NET application
and different browsers come with different email clients (IE comes with
Outlook Express and Netscape comes with its own email client, for example),
even your client-side code (JavaScript) can only *ask* the client (browser)
to launch a new email. The client will do this in whatever email client it
is configured to use (and there is no guarantee that this program will be
Outlook).

The only situation I can see where this would work 100% of the time is one
where you know for sure that each of your visitors will have Outlook and
that their web client has been configured to use Outlook as the default
program to handle email (an intranet). But, even in intranets, there is
always someone who downloads Firefox or Mozilla because they prefer it to
the company choice of IE.

What this leaves you with is 2 choices:

1. Create a web page that contains a form for users to fill out (this form
acts as the email template) and the data is sent via email through your
server-side code.

2. Use the traditional HTML "mailto:" in your client-side code (are you
really running into emails longer than 512 chars?).

<xi********@gmail.comwrote in message
news:11**********************@t69g2000cwt.googlegr oups.com...
Is there a way to create an New Outlook Email from an ASP.NET
application? I can not use "mailto:", since it is only support a
string less than 512. I have find a good way from link :
http://zones.advisor.com/doc/17330 , that thread show how to create a
new appointment instead of email. but I have no idea about the format
of a new email. Does any one know the format of a new outlook email
i.e.
Response.ContentType = "text/XXXXXX"
Response.AppendHeader("content-disposition", "inline;
filename=oneEmail.XXXXX")

and the body of the file

Thanks

Lu

Feb 28 '07 #3

P: n/a
thanks for your guys reply,
What I am doing is a intranet App, and I am sure every user's pc had
outlook installed. If you take a look of the link of my first post,
you will understand what I am trying to do is just build a new message
draft and download to clientside, which will let IE fire outlook to
open it, after that it will let user modify the draft and decide to
send it or not. The reason I want to let user send email at client
side using outlook is there are some benefits. i.e. save a copy at
"send" folder, input email address from outlooks address book, let
user do some modification and decide to sent it or just save a draft..

Mar 1 '07 #4

P: n/a
On Mar 1, 9:19 am, xin.yad...@gmail.com wrote:
thanks for your guys reply,
What I am doing is a intranet App, and I am sure every user's pc had
outlook installed. If you take a look of the link of my first post,
you will understand what I am trying to do is just build a new message
draft and download to clientside, which will let IE fire outlook to
open it, after that it will let user modify the draft and decide to
send it or not. The reason I want to let user send email at client
side using outlook is there are some benefits. i.e. save a copy at
"send" folder, input email address from outlooks address book, let
user do some modification and decide to sent it or just save a draft..
BTW, I do know the body of the email will longer than 512 characters,
since those email are reports which willl will be sent between
different departments.

Mar 1 '07 #5

P: n/a
I think you are missing something here.

Using the simple <a href="mailto:so*****@somewhere.something">Click here to
send mail</a does not, in any way, restrict the body of the email.

All that happens is that the client browser will open a new mail message
from whatever email client it uses and a new email message will be provided.
I don't see why this isn't going to work for you. Once that message is
opened, it's business as usual.
<xi********@gmail.comwrote in message
news:11**********************@v33g2000cwv.googlegr oups.com...
On Mar 1, 9:19 am, xin.yad...@gmail.com wrote:
>thanks for your guys reply,
What I am doing is a intranet App, and I am sure every user's pc had
outlook installed. If you take a look of the link of my first post,
you will understand what I am trying to do is just build a new message
draft and download to clientside, which will let IE fire outlook to
open it, after that it will let user modify the draft and decide to
send it or not. The reason I want to let user send email at client
side using outlook is there are some benefits. i.e. save a copy at
"send" folder, input email address from outlooks address book, let
user do some modification and decide to sent it or just save a draft..

BTW, I do know the body of the email will longer than 512 characters,
since those email are reports which willl will be sent between
different departments.

Mar 2 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.