473,765 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Conten tType = "text/XXXXXX"
Response.Append Header("content-disposition", "inline;
filename=oneEma il.XXXXX")

and the body of the file

Thanks

Lu

Feb 28 '07 #1
5 7213
<xi********@gma il.comwrote in message
news:11******** **************@ t69g2000cwt.goo glegroups.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********@gma il.comwrote in message
news:11******** **************@ t69g2000cwt.goo glegroups.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.Conten tType = "text/XXXXXX"
Response.Append Header("content-disposition", "inline;
filename=oneEma il.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...@gmai l.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">Cli ck 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********@gma il.comwrote in message
news:11******** **************@ v33g2000cwv.goo glegroups.com.. .
On Mar 1, 9:19 am, xin.yad...@gmai l.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
5427
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 oApp As Outlook.Application = New Outlook.Application Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi") oNS.Logon(Missing.Value, Missing.Value, False, True) Dim oInbox As Outlook.MAPIFolder =...
0
2149
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 i am using outlook 2000. Outlook can be configured to use the default outlook email editor or use ms word as the email editor in outlook. The sample code below simply creates an email with a hyperlink. The problem I am facing is that when...
1
2559
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 can't use SMTP. When I run the application through Visual Studio.Net (by clicking debug in either debug or release modes), it works fine and the email is sent. When I run it by going to Internet Explorer directly and typing in my local host...
1
6932
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 advice, Stephen
1
47501
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 = CreateObject("outlook.application") For i = 0 To Email.Length - 1
2
14408
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 their products including pictures to assist the sales staff describe features to the customer. The next step in development of the app is to have a button when in a particular product screen that the seller can press which sends the customer an...
3
5873
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: public partial class CheckAccountsService : ServiceBase {
0
2021
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 looooooong error. I can also see, when I add a reference to my project, that the Microsoft.Office.Core and the Outlook References have a yellow exclamation mark. If I remove my reference to the Outlook object model, the code marked with a
9
12627
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 Outlook.Application Do I need to install Microsoft Outlook 9.0 Object Library? When I go to Tools-->references I checked off MS outlook 9.0 Object Library. Then it tell me it is missing MS outlook 9.0 Object Library. Appreciated if someone can give me some...
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10160
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9951
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.