Hi everyone,
I want to create an email link to click on, how can I create it? I'm new, so the simpler the better. Thanks in advance!
Create email link
- mhsuffolk
- Contributor
- Posts: 199
- Joined: Sat Oct 26, 2019 9:13 am
- Phoenix Version: v1.1.0.6
- Has thanked: 13 times
- Been thanked: 11 times
Re: Create email link
Add mailto: to the front of the email thus
you@here.com
would be
you@here.com
would be
Code: Select all
mailto:you@here.com-
14Steve14
- Senior Contributor
- Posts: 923
- Joined: Fri Oct 25, 2019 7:01 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 17 times
- Been thanked: 103 times
Re: Create email link
You can also include the subject line if you wish. Here is a link to a handy website that will explain other things that can also be added into the email links.
https://css-tricks.com/snippets/html/mailto-links/
https://css-tricks.com/snippets/html/mailto-links/
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: Create email link
Possibly better practice would be to link to contact_us.php to mitigate against bots and scrapers used for spamming.
Just sharing a quick tip here in case it becomes useful to others.
There can be times when publishing the store e-mail address in the store might be desired or required.
Using the STORE_OWNER_EMAIL_ADDRESS from the database or using just plain text to output the e-mail address can make it easy for scraper bots to collect it for bad reasons - spamming.
Instead of using:
example@domain.com
use:
example@domain.com
or
example<!-- HTML comment -->@<!-- HTML comment -->domain.com
Both of these will appear as example@domain.com to your customers but bots/scrapers will usually scrape the HTML and neither example@domain.com nor example<!-- HTML comment -->@<!-- HTML comment -->domain.com will reach your inbox!