Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

Issuing a mailto:

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian - 20 Oct 2005 13:02 GMT
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
Curt_C [MVP] - 20 Oct 2005 13:41 GMT
build your info, pass it back to the client through a javascript
"window.open()" perhaps.

Signature

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

> Hi,
>
[quoted text clipped - 9 lines]
>
> Brian
Andy Fish - 20 Oct 2005 13:52 GMT
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

> Hi,
>
[quoted text clipped - 9 lines]
>
> Brian
Brian - 20 Oct 2005 14:07 GMT
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
> The first point to make is that mailto: is not covered by internet
> standards and is generally considered bad practice for anything other than
[quoted text clipped - 34 lines]
>>
>> Brian

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.