473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Setting email using mailto

I am trying to put an persons email address in a response I am sending
another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is
that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I want
it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.
Nov 19 '05 #1
15 3230
Some mail clients will automagically "linkify" an e-mail address. For
example, in your post, tr*@aol.com is a link for me in Outlook Express. If
you wanted to be certain, you'd have to generate an html e-mail and use "<a
href=""mailto:" & session("email") & """>" & session("email") & "</a>."
But, if the e-mail client supports html e-mail, there's a damn good chance
it will also automagically make tr*@aol.com into a link without your having
to put a mailto: in front of it.

Ray at work

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I am trying to put an persons email address in a response I am sending
another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is
that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I want it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.

Nov 19 '05 #2
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:OH**************@tk2msftngp13.phx.gbl...
Some mail clients will automagically "linkify" an e-mail address. For
example, in your post, tr*@aol.com is a link for me in Outlook Express.
If
you wanted to be certain, you'd have to generate an html e-mail and use
"<a
href=""mailto:" & session("email") & """>" & session("email") & "</a>."
But, if the e-mail client supports html e-mail, there's a damn good chance
it will also automagically make tr*@aol.com into a link without your
having
to put a mailto: in front of it.
I tried you your href and it didn't even give me a link. I've had this
trouble before and am not sure what is causing it. When I use your line, I
get:

a href="mailto:tf*@ftsolutions.com">tf*@ftsolutions. com</a>

but no link.

Am I missing something?

Thanks,

Tom
Ray at work

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I am trying to put an persons email address in a response I am sending
another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is
that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I

want
it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.


Nov 19 '05 #3

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I tried you your href and it didn't even give me a link. I've had this
trouble before and am not sure what is causing it. When I use your line,
I get:

a href="mailto:tf*@ftsolutions.com">tf*@ftsolutions. com</a>


Well, for one thing, you forgot the < before the a href=... But is your
e-mail in plain text or HTML? Can you show the code snippet that you're
using to create and send the e-mail?

Ray at work
Nov 19 '05 #4
AFAIK, the only way to do it is with an HTML-formatted e-mail:
<a href="mailto:te**@example.com">te**@example.com</a>

You'd have to change the message format though for it to render
correctly in the e-mail client:
message.BodyFormat = MailFormat.Html

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp
tshad wrote:
I am trying to put an persons email address in a response I am sending another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I want it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.


Daniel M. Hendricks
http://www.danhendricks.com

Nov 19 '05 #5
AFAIK, the only way to do it is with an HTML-formatted e-mail:
<a href="mailto:te**@example.com">te**@example.com</a>

You'd have to change the message format though for it to render
correctly in the e-mail client:
message.BodyFormat = MailFormat.Html

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp
tshad wrote:
I am trying to put an persons email address in a response I am sending another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I want it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.


Daniel M. Hendricks
http://www.danhendricks.com

Nov 19 '05 #6
AFAIK, the only way to do it is with an HTML-formatted e-mail:
<a href="mailto:te**@example.com">te**@example.com</a>

You'd have to change the message format though for it to render
correctly in the e-mail client:
message.BodyFormat = MailFormat.Html

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp
tshad wrote:
I am trying to put an persons email address in a response I am sending another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I want it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.


Daniel M. Hendricks
http://www.danhendricks.com

Nov 19 '05 #7
AFAIK, the only way to do it is with an HTML-formatted e-mail:
<a href="mailto:te**@example.com">te**@example.com</a>

You'd have to change the message format though for it to render
correctly in the e-mail client:
message.BodyFormat = MailFormat.Html

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp
tshad wrote:
I am trying to put an persons email address in a response I am sending another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I want it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.


Daniel M. Hendricks
http://www.danhendricks.com

Nov 19 '05 #8
AFAIK, the only way to do it is with an HTML-formatted e-mail:
<a href="mailto:te**@example.com">te**@example.com</a>

You'd have to change the message format though for it to render
correctly in the e-mail client:
message.BodyFormat = MailFormat.Html

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp
tshad wrote:
I am trying to put an persons email address in a response I am sending another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I want it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.


Daniel M. Hendricks
http://www.danhendricks.com

Nov 19 '05 #9
AFAIK, the only way to do it is with an HTML-formatted e-mail:
<a href="mailto:te**@example.com">te**@example.com</a>

You'd have to change the message format though for it to render
correctly in the e-mail client:
message.BodyFormat = MailFormat.Html

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp
tshad wrote:
I am trying to put an persons email address in a response I am sending another person.

I can get it to work by doing the following:

message.Body = resumeTop & vbCrLf & vbCrLf & "For Applicant: " &
session("firstName") & " " & session("lastName") & vbCrLf & "Email:
mailto:" & session("email") & vbCrLf & vbCrLf & resumeBottom

When the email gets to the person, the email link works. The problem is that the "mailto:" also shows in outlook (mailto:tr*@aol.com). What I want it to show is tr*@aol.com and bring up the email client.

How is that done?

Thanks,

Tom.


Daniel M. Hendricks
http://www.danhendricks.com

Nov 19 '05 #10

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:uC**************@TK2MSFTNGP10.phx.gbl...

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I tried you your href and it didn't even give me a link. I've had this
trouble before and am not sure what is causing it. When I use your line,
I get:

a href="mailto:tf*@ftsolutions.com">tf*@ftsolutions. com</a>
Well, for one thing, you forgot the < before the a href=... But is your
e-mail in plain text or HTML? Can you show the code snippet that you're
using to create and send the e-mail?


Here is the code snippet I am using:

Dim Message As New MailMessage()
message.From = webMasterEmail
message.To = webMasterEmail
message.Subject = screenTestSubject
message.Body = "For Applicant: " & "<a
href='http://www.ftsolutions.com/login" & session("firstName") & " " &
session("lastName") & "</a>" & vbCrLf
message.Body = message.Body & "Email: <a href=""mailto:" &
session("email") & """>" & session("email") & "</a>." & vbCrLf & vbCrLf
SmtpMail.SmtpServer = mailServer
smtpMail.Send(message)

This gets me the following email - no link for either the normal href or the
mailto:

For Applicant: <a href='http://www.ftsolutions.com/loginThomas
Scheiderich</a>
Email: <a href="mailto:tf*@ftsolutions.com">tf*@ftsolutions. com</a>.

Thanks,

Tom
Ray at work

Nov 19 '05 #11
You need to set your mail format as HTML:
message.BodyFormat = MailFormat.Html

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp

Well, for one thing, you forgot the < before the a href=... But is your e-mail in plain text or HTML? Can you show the code snippet that you're using to create and send the e-mail?


Here is the code snippet I am using:

[snip]


Daniel M. Hendricks
http://www.danhendricks.com

Nov 19 '05 #12
"Daniel M. Hendricks" <dm*********@despammed.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
You need to set your mail format as HTML:
message.BodyFormat = MailFormat.Html
That did it.

I was surprised it work as I was not setting up a normal HTML page, just
some HTML elements.

Do I need to anything different if I am setting up a total HTML page? I
assume I wouldn't use CSS for an HTML I am sending in an email - right?

Thanks,

Tom

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp

> Well, for one thing, you forgot the < before the a href=... But is your > e-mail in plain text or HTML? Can you show the code snippet that you're > using to create and send the e-mail?


Here is the code snippet I am using:

[snip]


Daniel M. Hendricks
http://www.danhendricks.com

Nov 19 '05 #13
Also, when I use the MailFormat.Html, I found that my vbCrLf doesn't work.
Do I need to use <br> instead to make it work because of the HTML
formatting?

Tom

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uK*************@TK2MSFTNGP10.phx.gbl...
"Daniel M. Hendricks" <dm*********@despammed.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
You need to set your mail format as HTML:
message.BodyFormat = MailFormat.Html


That did it.

I was surprised it work as I was not setting up a normal HTML page, just
some HTML elements.

Do I need to anything different if I am setting up a total HTML page? I
assume I wouldn't use CSS for an HTML I am sending in an email - right?

Thanks,

Tom

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp

> Well, for one thing, you forgot the < before the a href=... But is

your
> e-mail in plain text or HTML? Can you show the code snippet that

you're
> using to create and send the e-mail?

Here is the code snippet I am using:

[snip]


Daniel M. Hendricks
http://www.danhendricks.com


Nov 19 '05 #14
Also,
if I use the MailFormat.Html, the text I got from one of my fields which is
of type text and has linefeeds in them, does not display them correctly.

How do I go about handling these linefeeds? The field is a freeform field
that the client can put in some text and needs to be displayed how they put
it in.

Thanks,

Tom.

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Also, when I use the MailFormat.Html, I found that my vbCrLf doesn't work.
Do I need to use <br> instead to make it work because of the HTML
formatting?

Tom

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uK*************@TK2MSFTNGP10.phx.gbl...
"Daniel M. Hendricks" <dm*********@despammed.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
You need to set your mail format as HTML:
message.BodyFormat = MailFormat.Html


That did it.

I was surprised it work as I was not setting up a normal HTML page, just
some HTML elements.

Do I need to anything different if I am setting up a total HTML page? I
assume I wouldn't use CSS for an HTML I am sending in an email - right?

Thanks,

Tom

See 'Sending HTML E-mail'
http://www.aspheute.com/english/20000918.asp
> Well, for one thing, you forgot the < before the a href=... But is
your
> e-mail in plain text or HTML? Can you show the code snippet that
you're
> using to create and send the e-mail?

Here is the code snippet I am using:

[snip]

Daniel M. Hendricks
http://www.danhendricks.com



Nov 19 '05 #15
Yes, when you use HTML format, you have to then use HTML just like you would
in a .htm file. vbCrLf will do nothing but put a cr+lf in the ~source~ of
the HTML body, just as it would in any other HTML document. Just send plain
text and be done with it. If someone doesn't see us**@domain.kom as a link
in his mail client, that is what the person is used to seeing anyway.

Ray at work
"tshad" <ts**********@ftsolutions.com> wrote in message
news:O3**************@TK2MSFTNGP10.phx.gbl...
Also,
if I use the MailFormat.Html, the text I got from one of my fields which is of type text and has linefeeds in them, does not display them correctly.

How do I go about handling these linefeeds? The field is a freeform field
that the client can put in some text and needs to be displayed how they put it in.

Thanks,

Tom.

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Also, when I use the MailFormat.Html, I found that my vbCrLf doesn't work. Do I need to use <br> instead to make it work because of the HTML
formatting?

Nov 19 '05 #16

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

Similar topics

20
by: TomatoeMan | last post by:
I'm using the following script on my web site. I have done this in order to keep web spider programs from harvesting my email address. I want to have the "Subject" line filled in also. Does...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
13
by: John Baker | last post by:
HI; Quick question: How do I specify an email subject when using the setup <a href="mailto:dogs@cats.com">Mail to the cat</a> Can someone show me how it would look if the subject was "mice"?...
4
by: Phil Campaigne | last post by:
Hello, I originally installed postgresql as root user and now I am setting up a development environment with cvs and a java ide and tomcat. I have everything with the exception of postgresql...
1
by: Larry Rebich | last post by:
I'm trying to launch the user's email client using 'MailTo:'. So I put a button on an aspx page and wrote some .vb code to use 'Mailto:' and it works on my development machine when I press the...
4
by: appkausman | last post by:
i am using IBSERVER and trying to mail a form to my email address my code is given below form.html <html> <head> </head> <body> <form method="POST" action="mail.php"> Name: <input...
2
by: kennykenn | last post by:
Hi, Ive producd code to send an email after capturing info off a form,it works fine locally but when i put it live it doesnt work! the code is stopin at 'msg.send' any ideas, here the code! ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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...

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.