473,406 Members | 2,849 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,406 software developers and data experts.

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

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
5 7189
<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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Job Lot | last post by:
I am retrieving message from the Inbox as follows: (MS Article ID 310258: How to use the Microsoft Outlook Object Library to retrieve a message from the Inbox by using Visual C# .NET) Try Dim...
0
by: VP | last post by:
g'day, i am posting a problem i have encountered with creating an email using outlook through some basic c# code. the problem arises when using different email editors in outlook. At the moment...
1
by: John Smith | last post by:
Hi, I'm trying to send email in our C# ASP.Net application using the Outlook 11 library. For a bunch of unimportant reasons (unimportant to this posting that is) we have to do it this way and...
1
by: Stephen Noronha | last post by:
Hi, I am trying a sample app to send an email from my app I am getting a "type not defined error" I have added "Office and Outlook" COM component but still I am getting this error... Please...
1
by: Michele | last post by:
Hi, I need to send the same Email to different people. I'm using Outlook XP and VB.Net. I tryed with the following code: Dim oOutL As Outlook.Application Dim oMail As Outlook._MailItem oOutL...
2
by: Siv | last post by:
Hi, I have written an application which is used by sales staff when discussing products with their customers over the phone. It is a database application that holds detailed information about...
3
by: sokolo | last post by:
Hello, I wrote a windows service application however it is not working. The service is supposed to enter a new task every 5 sec within Microsoft Outlook. Here is the code for application: ...
0
by: Mads Westen | last post by:
Hi, I'm trying to code a application that can create a new email in Outlook I have coded my project in VS 2003, but now I have upgraded to VS 2005. I can not build my project anymore, I get a...
9
by: CoCoCha | last post by:
Hi, I am trying to run a simple macro in excel vba to create a new email and attach two spreadsheets. But it won't work. It stops at the first line everytime. Dim objOutlook As...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...
0
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
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,...
0
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...

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.