FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » e-mail Hyperlink Code
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
e-mail Hyperlink Code [message #176996] Tue, 14 February 2012 23:14 Go to next message
mrc2323 is currently offline  mrc2323
Messages: 12
Registered: February 2011
Karma: 0
Junior Member
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: patsrun(at)pattillmanfoundation(dot)org.</div>
Re: e-mail Hyperlink Code [message #176997 is a reply to message #176996] Tue, 14 February 2012 23:32 Go to previous messageGo to next message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma: 0
Senior Member
.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: patsrun(at)pattillmanfoundation(dot)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
Re: e-mail Hyperlink Code [message #176998 is a reply to message #176996] Tue, 14 February 2012 23:37 Go to previous messageGo to next message
Beauregard T. Shagnas is currently offline  Beauregard T. Shagnas
Messages: 154
Registered: September 2010
Karma: 0
Senior Member
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: patsrun(at)pattillmanfoundation(dot)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:patsrun(at)pattillmanfoundation(dot)org'>patsrun(at)pattillmanfoundation(dot)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
Re: e-mail Hyperlink Code [message #176999 is a reply to message #176998] Wed, 15 February 2012 04:13 Go to previous messageGo to next message
mrc2323 is currently offline  mrc2323
Messages: 12
Registered: February 2011
Karma: 0
Junior Member
>> 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: patsrun(at)pattillmanfoundation(dot)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:patsrun(at)pattillmanfoundation(dot)org'>patsrun(at)pattillmanfoundation(dot)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<}}
Re: e-mail Hyperlink Code [message #177000 is a reply to message #176999] Wed, 15 February 2012 09:13 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
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
Re: e-mail Hyperlink Code [message #177001 is a reply to message #176999] Wed, 15 February 2012 10:46 Go to previous messageGo to next message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma: 0
Senior Member
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.
Re: e-mail Hyperlink Code [message #177053 is a reply to message #176996] Sat, 18 February 2012 00:09 Go to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
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).
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Owner & Group extract as 101 101 instead of root system
Next Topic: 0.1% tests failed while trying to build 5.3.10
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 20:12:03 GMT 2024

Total time taken to generate the page: 0.02381 seconds