By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,953 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,953 IT Pros & Developers. It's quick & easy.

Setting email using mailto

P: n/a
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
Share this Question
Share on Google+
15 Replies


P: n/a
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

P: n/a
"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

P: n/a

"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

"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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.