Thursday, March 29, 2012

Mailto:

Ok so here's my code: I'm using the clients mail client to send an email to an address listed in a list box. It works fine when I test the code in visual studio but once I publish the webite to my IIS server nothing happens when I click the button.

ProtectedSub btnSend_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles btnSend.Click

System.Diagnostics.Process.Start("mailto:" & lstAssociates.SelectedValue)

EndSub

Please help!!! Any idea why this is happening or how to fix it?

What are you trying to do? open the e-mail client on the server

http://forums.asp.net/t/1193620.aspx


No I'm after a quick and dirty implimentation allowing the client to send an email to a specified address using their default mail client. eg Outlook


I think you should keep to one post


Hi.

Try looking at the following websites:
http://www.thescarms.com/dotNet/process.aspx
http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.aspx

In the MSDN link, it says that URLs cannot be opened as documnets, so what you probably want is this:

System.Diagnostics.Process.Start("iexplore.exe","mailto:" & lstAssociates.SelectedValue)

0 comments:

Post a Comment