Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

e-mail Hyperlink Code

0 views
Skip to first unread message

Mike Copeland

unread,
Feb 14, 2012, 6:14:05 PM2/14/12
to
How do I code the syntax to get the e-mail link at the end of the
code below to (1) show it's a hyperlink and (2) call the user's e-mail
client to create and send the e-mail request? I'm able to do this in
HTML code and file (e.g. href="mailto:..."), but it doesn't work in a
PHP file. Please advise. TIA

<div class="eventInfo">To request a confirmation e-mail be resent or to
update a participant e-mail, send the participant name and e-mail
address to: pat...@pattillmanfoundation.org.</div>

Michael Fesser

unread,
Feb 14, 2012, 6:32:23 PM2/14/12
to
.oO(Mike Copeland)

> How do I code the syntax to get the e-mail link at the end of the
>code below to (1) show it's a hyperlink and (2) call the user's e-mail
>client to create and send the e-mail request? I'm able to do this in
>HTML code and file (e.g. href="mailto:..."), but it doesn't work in a
>PHP file. Please advise. TIA

If you can do it with HTML, you can do it with PHP. There's no
difference, since PHP just outputs HTML.

><div class="eventInfo">To request a confirmation e-mail be resent or to
>update a participant e-mail, send the participant name and e-mail
>address to: pat...@pattillmanfoundation.org.</div>

This is pure HTML, but it doesn't contain a link, so it won't work as
expected. You have to use an 'a' element and a 'mailto' URL, as you've
already mentioned above.

Micha

--
http://mfesser.de/blickwinkel

Beauregard T. Shagnasty

unread,
Feb 14, 2012, 6:37:21 PM2/14/12
to
Use the mailto.

<div class="eventInfo">To request a confirmation e-mail be resent or to
update a participant e-mail, send the participant name and e-mail address
to: <a
href='mailto:pat...@pattillmanfoundation.org'>pat...@pattillmanfoundation.org</
a>.</div>

I'd recommend using some method of obfuscating it though, to keep the
spammer bots from harvesting the address.

--
-bts
-This space for rent, but the price is high

Mike Copeland

unread,
Feb 14, 2012, 11:13:02 PM2/14/12
to
Perfect. Thanks you... 8<}}

Denis McMahon

unread,
Feb 15, 2012, 4:13:03 AM2/15/12
to
On Tue, 14 Feb 2012 21:13:02 -0700, Mike Copeland wrote:

>> > How do I code the syntax to get the e-mail link at the end of the
>> > code below to (1) show it's a hyperlink and (2) call the user's
>> > e-mail client to create and send the e-mail request?

It's very rare that this will send the email request, normally it will
open the user's email client and create a message ready to send.

There's no "proper" way for the web browser to activate the send button
in the users email client.

Just think how bad it would be if I could make you send any email content
I wanted to any recipient(s) I wanted from you when you clicked on a link
on my website.

Rgds

Denis McMahon

Captain Paralytic

unread,
Feb 15, 2012, 5:46:17 AM2/15/12
to
On Feb 15, 4:13 am, mrc2...@cox.net (Mike Copeland) wrote:
> > > How do I code the syntax to get the e-mail link at the end of the code
> > > below to (1) show it's a hyperlink and (2) call the user's e-mail client
> > > to create and send the e-mail request?  I'm able to do this in HTML code
> > > and file (e.g. href="mailto:..."), but it doesn't work in a PHP file.
> > > Please advise.  TIA
>
> > > <div class="eventInfo">To request a confirmation e-mail be resent or to
> > > update a participant e-mail, send the participant name and e-mail
> > > address to: pats...@pattillmanfoundation.org.</div>
>
> > Use the mailto.
>
> > <div class="eventInfo">To request a confirmation e-mail be resent or to
> > update a participant e-mail, send the participant name and e-mail address
> > to: <a
> > href='mailto:pats...@pattillmanfoundation.org'>pats...@pattillmanfoundation.org</
> > a>.</div>
>
> > I'd recommend using some method of obfuscating it though, to keep the
> > spammer bots from harvesting the address.
>
>    Perfect.  Thanks you...  8<}}

Considering that so many people nowadays do not use an email client,
instead using web mail, I would hardly call this Perfect since it will
fail so often.

Thomas 'PointedEars' Lahn

unread,
Feb 17, 2012, 7:09:48 PM2/17/12
to
Mike Copeland wrote:

> How do I code the syntax to get the e-mail link at the end of the
> code below to (1) show it's a hyperlink and (2) call the user's e-mail
> client to create and send the e-mail request? I'm able to do this in
> HTML code and file (e.g. href="mailto:..."), but it doesn't work in a
> PHP file. Please advise. TIA

That is an ill-conceived approach as it presupposes the availability of an
e-mail client application. In a decade where Google Mail is widely used,
such a program to be installed *and* properly configured on the client
computer is even more improbable than it was in the previous decade, of
Internet cafés.

In any case, `mailto:' *does* work to that extent in a "PHP file" (you
should think of "PHP files" as scripts, as *computer programs* instead).
But it will never, anywhere, automatically submit the e-mail.

Use a form-mailer instead.


PointedEars
--
When all you know is jQuery, every problem looks $(olvable).
0 new messages