473,503 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Issuing a mailto:

Hi,

I want to issue mailto from one of my pages. Basically to drop contact
information from a from to the body of the email and have the user enter the
desired address to send it to. I thought that I could use response.redirect
for this, but I get a "the page could not be displayed" error in my window
and not the outlook window. I am initiating this from the onclick of a
button. It does work with a HyperlinkButton, but I need to build the mailto
content before issuing the command.

Any Suggestions? Am I going about this the right way?

Brian
Nov 19 '05 #1
3 1904
build your info, pass it back to the client through a javascript
"window.open()" perhaps.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Brian" wrote:
Hi,

I want to issue mailto from one of my pages. Basically to drop contact
information from a from to the body of the email and have the user enter the
desired address to send it to. I thought that I could use response.redirect
for this, but I get a "the page could not be displayed" error in my window
and not the outlook window. I am initiating this from the onclick of a
button. It does work with a HyperlinkButton, but I need to build the mailto
content before issuing the command.

Any Suggestions? Am I going about this the right way?

Brian

Nov 19 '05 #2
The first point to make is that mailto: is not covered by internet standards
and is generally considered bad practice for anything other than a simple
"contact me" link. For instance, it won't work if the user uses webmail or
hasn't properly configured the default email client.

specifying the body text as part of the link only works with certain
combinations of browser and mail client (IIRC it works in with IE and
Outlook Express but not Outlook)

my preference would normally be to send the email from the server (in
asp.net use System.Web.Mail). however, this does assume that your server has
access to an smtp server that can send the mail.

if you want to use mailto with dynamically generated text, and
response.redirect doesn't work, my next best guess would be to use something
like:

<body onload='document.location.href="mailto:blah blah<%=the server
generated content"%>'>

I haven't tested it so I don't know if that would work, but if it doesn't, I
can't think of any solution.

Andy
"Brian" <br***********@gmail.com> wrote in message
news:eq*************@TK2MSFTNGP10.phx.gbl...
Hi,

I want to issue mailto from one of my pages. Basically to drop contact
information from a from to the body of the email and have the user enter
the desired address to send it to. I thought that I could use
response.redirect for this, but I get a "the page could not be displayed"
error in my window and not the outlook window. I am initiating this from
the onclick of a button. It does work with a HyperlinkButton, but I need
to build the mailto content before issuing the command.

Any Suggestions? Am I going about this the right way?

Brian

Nov 19 '05 #3
Thank you for the heads up on the issues with mailto. These are not an issue
in my case where this will be running in a controlled environment over our
Intranet. An the functionality was explicitly asked for.

After playing around some, I found the hyperlinkbutton works, but it is ugly
and doesn't get displayed the same way that my other buttons are. So I
thought of hiding it and causing a click from code, but there doesn't appear
to be a way to do this.

Anyway, I will have a look at you suggestion and keep digging.

Thanks

Brian
"Andy Fish" <aj****@blueyonder.co.uk> wrote in message
news:eQ**************@TK2MSFTNGP10.phx.gbl...
The first point to make is that mailto: is not covered by internet
standards and is generally considered bad practice for anything other than
a simple "contact me" link. For instance, it won't work if the user uses
webmail or hasn't properly configured the default email client.

specifying the body text as part of the link only works with certain
combinations of browser and mail client (IIRC it works in with IE and
Outlook Express but not Outlook)

my preference would normally be to send the email from the server (in
asp.net use System.Web.Mail). however, this does assume that your server
has access to an smtp server that can send the mail.

if you want to use mailto with dynamically generated text, and
response.redirect doesn't work, my next best guess would be to use
something like:

<body onload='document.location.href="mailto:blah blah<%=the server
generated content"%>'>

I haven't tested it so I don't know if that would work, but if it doesn't,
I can't think of any solution.

Andy
"Brian" <br***********@gmail.com> wrote in message
news:eq*************@TK2MSFTNGP10.phx.gbl...
Hi,

I want to issue mailto from one of my pages. Basically to drop contact
information from a from to the body of the email and have the user enter
the desired address to send it to. I thought that I could use
response.redirect for this, but I get a "the page could not be displayed"
error in my window and not the outlook window. I am initiating this from
the onclick of a button. It does work with a HyperlinkButton, but I need
to build the mailto content before issuing the command.

Any Suggestions? Am I going about this the right way?

Brian


Nov 19 '05 #4

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

Similar topics

2
13266
by: Bill Petrol | last post by:
I'm trying to send a link with a querystring as the body of an email message. My HTML syntax looks something like this: <a href="mailto:xxx@yyy.com?Subject=<? print $subject ?>&Body=<? print...
15
24699
by: nAmYzArC | last post by:
Hi everyone, I'm setting the body of an email using values from a form firstname = bob lastname = dole ebody = 'First Name: ' + firstname + '\r\n' + 'Last Name: ' + lastname ...
12
2934
by: ElvisIsDead | last post by:
Have a script that takes a form and emails it automatically. Here is the part: <form onSubmit="return editData();" name="estm" enctype="text/plain" method="post"...
15
29888
by: Val | last post by:
Any experts on mailto: tags? I want to set a link so that the subject and some of the body of the email is filled in. This is easy for simple text, although you need to use %20 for spaces: <a...
18
28307
by: Shinin | last post by:
I am trying to set up a mailto: link so that the actual address that the email is being sent to is obscured and replaced by a name. For example, I have <a href="mailto:jschmoe@abc.com">Joe...
10
17274
by: Adam Smith | last post by:
How can I set up a mailto with a cc or bcc as well as a subject designation. The system works for two but not three, is this a hardwired limit or have I missed something ==> <a...
6
1737
by: cj | last post by:
I'm tryin to set up a sqlcommand in VB.NET that would issue the command: insert into server1.database.owner.table select * from server2.database.owner.table Since this sqlcommand has it's...
4
3382
by: Randy | last post by:
Hello, I'm trying to find out if it is possible, and if so...how to accomplish issuing a PLSQL command from within C#. The command is... SET SCAN OFF; What is happening is I'm trying to...
2
6302
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
Hi, I want to create a mailto link from data coming from an SQLDataSource. How do I have to change the following code to get it working? The mailto works, outlook starts with a new message, but...
0
7202
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
7086
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
7280
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,...
1
6991
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
7462
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
5578
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
5014
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...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
382
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.