dikmus
Posts: 19
|
Posted: 07/07/2006, 1:51 AM |
|
Hi,
In a task management system I have a page showing an email address and task. (From a database). Now I want the user to be able to push a button that opens the task with the given email address in outlook.
I want to open the message in outlook so that the user can change the message or add an attachment if he/she wants, also I hope code for creating a outlook message could be easier then using a SMTP server.
Anybody knows some simple .net code to accomplish this?
Thanks Dik
_________________
www.musit.nl |
|
|
WKempees
|
Posted: 07/07/2006, 5:28 AM |
|
Hi Dik,
(NL?)
Not sure I totally undestand your message but:
creating a hyperlink in the format
<a
href="mailto:recipient.name@domain.tld?subject=this%20is%20the%20text%in%20the%subject">taskname
data</a>
will give the user, when clicked an new email in his current email program.
The user can then add all the text he wants, click send and the email is on
its way.
Disadvantage is that if the users machine has no email client installed this
will not work.
Prefilled content, if this is what you need (to have text in the content of
the email), we will have to investigate further.
anything following ?subject can be dynamically filled from your database as
long as you replace spaces with %20.
taskname data is ment to be databsedata, so is the recipient.....tld
Walter
|
|
|
dikmus
Posts: 19
|
Posted: 07/07/2006, 7:36 AM |
|
Hi Walter,
NL, (Amsterdam) indeed. also NL perhaps?
Thanks for your very helpfull contribution. This indeed is a simple solution.
I hope I can change the spaces in the database text to %20.
Also I would like to use a default body text, but if not possible, I just put as much as i can in the subject line.
Thanks again, dik
_________________
www.musit.nl |
|
|
WKempees
|
Posted: 07/10/2006, 1:32 AM |
|
NL(Capelle a/d IJssel)
No answer on filling the body yet, but will get back on that.
Find the .NET equivalence of a string_replace to substitute spacen for
"%20", that should be easy.
Walter
|
|
|
stockton
|
Posted: 08/09/2006, 5:39 AM |
|
<a href="mailto:email@address.com?subject=Subject Text&body=Message Text">HyperLink</a>
Personally I have not botheres with the %20's for spaces. However, have used %0's for new lines in the Message Text.
Simon
|
|
|
|