Email linking

This is a discussion on "Email linking" within the Web Page Design section. This forum, and the thread "Email linking are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 5th, 2007, 19:34
New Member
Join Date: Aug 2006
Location: devon
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Email linking

Im doing a simple website in dreamweaver. I have got a contact me page...how do i link an email address to open outlook express?
Reply With Quote

  #2 (permalink)  
Old Aug 5th, 2007, 19:40
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,793
Blog Entries: 9
Thanks: 0
Thanked 2 Times in 2 Posts
Re: Email linking

Quote:
<a href="mailto:email@address.here">click here to email</a>
It's in the insert bar of dreamweaver also
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #3 (permalink)  
Old Aug 5th, 2007, 19:40
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

[html]
Code: Select all
 <p><a href="mailto:joebloggs@stupidemail.com">Contact me here:</a></p>
You may wish to bear in mind that an open email address like that may be harvested by spambots. There are ways around it, particularly by using a contact form and php script.
Reply With Quote
  #4 (permalink)  
Old Aug 5th, 2007, 21:49
SuperMember

SuperMember
Join Date: Apr 2007
Location: Ireland
Age: 15
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

You might find this article useful if you are worried about spam bots.
Reply With Quote
  #5 (permalink)  
Old Aug 5th, 2007, 22:27
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,793
Blog Entries: 9
Thanks: 0
Thanked 2 Times in 2 Posts
Re: Email linking

yeah i hate mailtos as i don't use any programs to manage email
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #6 (permalink)  
Old Aug 6th, 2007, 20:06
Reputable Member
Join Date: Mar 2007
Location: Kenya
Age: 19
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

I hate them too. I never use them in any of my sites. They slowup weak computers too if u click them by mistake. we have such kind of computers around here lol
Reply With Quote
  #7 (permalink)  
Old Aug 6th, 2007, 21:20
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,793
Blog Entries: 9
Thanks: 0
Thanked 2 Times in 2 Posts
Re: Email linking

yeah if you accidentally click it, it drags up some program.
and if you want to copy and paste it, it's just awkward.
Search google for an email form
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #8 (permalink)  
Old Aug 6th, 2007, 21:41
Reputable Member
Join Date: Mar 2007
Location: Kenya
Age: 19
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

There are some email forms here I remember I got a good one here. Very supper and very simple to customize. here is home n I'm sure its there. If you don't get them I can send you my code
Reply With Quote
  #9 (permalink)  
Old Aug 6th, 2007, 21:47
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 723
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

IF you must use the mailto: function then at least "encrypt" your email address by using the html entities to create your email address out of a strong of entities rather than letters.

So instead of test@user.com

it would be something like

Code: Select all
test@user.com
Reply With Quote
  #10 (permalink)  
Old Aug 6th, 2007, 21:55
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 723
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

lol ok I dunno how to make this work because its obviouly jusy changing the codes I use into the letters they represent!

so I will put a space in between the & and the string....

t = & #116;
e = & #101;
s = & #115;
t = & #116;
@ = & #064;
u = & #117;
s = & #115;
e = & #101;
r = & #114;
. = & #046;
c = & #099;
o = & #111;
m = & #109;

They are the entities, if you put these next to each other, minus the t =, e = etc. then it will print out the email address!
Reply With Quote
  #11 (permalink)  
Old Aug 6th, 2007, 22:00
Reputable Member
Join Date: Mar 2007
Location: Kenya
Age: 19
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

will this prevent from spam bots? lol I have never seen those codes I think they r complicated for newbies
Reply With Quote
  #12 (permalink)  
Old Aug 6th, 2007, 22:08
Reputable Member
Join Date: Mar 2007
Location: Kenya
Age: 19
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

Here is what you need. Read and customize how you want it to be

PHP: Select all

<?php
/*
DESCRIPTION
FormToEmail allows you to place a form on your website which your visitors can fill out and send to you. The contents of the form are sent to the email address which you specify below. The form allows your visitors to enter their name, email address and comments. If they try to send a blank form, they will be returned to the form.
Your visitors (and nasty spambots!) cannot see your email address!  The script cannot be hijacked by spammers.
When the form is sent, your visitor will get a confirmation of this on the screen, and will be given a link to continue to your homepage, or other page if you specify it.
Should you need the facility, you can add additional fields to your form, which this script will also process, without making any additional changes.
This is a PHP script. In order for it to run, you must have PHP (version 4.1.0 or later) on your webhosting account. If you are not sure about this, then please ask your webhost about it.
SETUP INSTRUCTIONS
Step 1: Put the form on your webpage
Step 2: Enter your email address and continue link below
Step 3: Upload the files to your webspace
Step 1:
To put the form on your webpage, copy the code below as it is, and paste it into your webpage:
<form action="FormToEmail.php" method="post">
<table border="0" bgcolor="#ececec" cellspacing="5">
<tr><td><font face="arial" size="2">Name</font></td><td><input type="text" size="30" name="Name"></td></tr>
<tr><td><font face="arial" size="2">Email address</font></td><td><input type="text" size="30" name="Email"></td></tr>
<tr><td valign="top"><font face="arial" size="2">Comments</font></td><td><textarea name="Comments" rows="6" cols="30"></textarea></td></tr>
<tr><td>&nbsp;</td><td><input type="submit" value="Send"><font face="arial" size="1">&nbsp;&nbsp;FormToEmail by <a href="<A href="http://FormToEmail.com">FormToEmail.com</a></font></td></tr">http://FormToEmail.com">FormToEmail.com</a></font></td></tr>
</table>
</form>
Step 2:
Enter the email address below to send the form to:
*/
$my_email "delete these words and put the email address only in here between the quotes";
/*
Enter the continue link to offer the user after the form is sent. If you do not change this, your visitor will be given a continue link to your homepage:
If you do change it, remove the "/" symbol below and replace with the name of the page to link to, eg: "mypage.htm" or "http://www.elsewhere.com/page.htm"
*/
$continue "/";
/*
Step 3:
Save this file (FormToEmail.php) and upload it together with your webpage to your webspace. IMPORTANT - The file name is case sensitive! You must save it exactly as it is named above! Do not put this script in your cgi-bin directory (folder) it may not work from there.
THAT'S IT, FINISHED!
You do not need to make any changes below this line.
*/
// This line prevents values being entered in a URL
if ($_SERVER['REQUEST_METHOD'] != "POST"){exit;}
// Check referrer is from same site.
if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){print "Please enable referrer logging to use this contact form. Your message was not sent."; exit;}
// Describe function to check for new lines.
function new_line_check($a)
{
if(
preg_match('`[\r\n]`',$a)){header("location: $_SERVER[HTTP_REFERER]");exit;}
}
new_line_check($_POST['Name']);
// Check for disallowed characters in the Name and Email fields.
$disallowed_name = array(':',';','"','=','(',')','{','}','@');
foreach(
$disallowed_name as $value)
{
if(
stristr($_POST['Name'],$value)){header("location: $_SERVER[HTTP_REFERER]");exit;}
}
new_line_check($_POST['Email']);
$disallowed_email = array(':',';',"'",'"','=','(',')','{','}');
foreach(
$disallowed_email as $value)
{
if(
stristr($_POST['Email'],$value)){header("location: $_SERVER[HTTP_REFERER]");exit;}
}
$message "";
// This line prevents a blank form being sent, and builds the message.
foreach($_POST as $key => $value){if(!(empty($value))){$set=1;}$message $message "$key: $value\n\n";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}
$message $message "-- \nThank you for using FormToEmail from http://FormToEmail.com";
$message stripslashes($message);
$subject "FormToEmail Comments";
$headers "From: " $_POST['Email'] . "\n" "Return-Path: " $_POST['Email'] . "\n" "Reply-To: " $_POST['Email'] . "\n";
mail($my_email,$subject,$message,$headers);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Form To Email PHP script from FormToEmail.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-uk">
</head>
<body bgcolor="#ffffff" text="#000000">
<div>
<center>
<font face="arial" size="2"><b>Thank you <?php print stripslashes($_POST['Name']); ?>!</b>
<br>Your message has been sent</font>
<p><font face="arial" size="2"><a href="<?php print "$continue"?>">Click here to continue</a></font></p>
<p><font face="arial" size="2"><b>FormToEmail</b> by <a href="<A href="http://FormToEmail.com">FormToEmail.com</a></font></p">http://FormToEmail.com">FormToEmail.com</a></font></p>
</center>
</div>
</body>
</html>
--
John
Reply With Quote
  #13 (permalink)  
Old Aug 6th, 2007, 22:19
Reputable Member
Join Date: Mar 2007
Location: Kenya
Age: 19
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

This one looks more updated than the above

PHP: Select all

<?php

/*

Thank you for choosing FormToEmail by FormToEmail.com

Version 2.2 July 1st 2007

COPYRIGHT FormToEmail.com 2003 - 2007

You are not permitted to sell this script, but you can use it, copy it or distribute it, providing that you do not delete this copyright notice, and you do not remove any reference to FormToEmail.com

For support, please visit: http://formtoemail.com/support/

You can get the Pro version of this script here: http://formtoemail.com/formtoemail_pro_version.php
---------------------------------------------------------------------------------------------------

FormToEmail-Pro (Pro version) Features:

Check for required fields.
Attach file uploads.
Photo CAPTCHA system.
Check for a set cookie.
HTML output option.
CSV output to attachment or file.
Show sender's IP address.
Block IP addresses.
Block web addresses or rude words.
Block gobbledegook characters (Ĺ đ ç etc).
Auto redirect to "Thank You" page.
No branding.
Use on multiple sites.

---------------------------------------------------------------------------------------------------

FormToEmail DESCRIPTION

FormToEmail is a contact-form processing script written in PHP. It allows you to place a form on your website which your visitors can fill out and send to you.  The contents of the form are sent to the email address (or addresses) which you specify below.  The form allows your visitors to enter their name, email address and comments.  The script will not allow a blank form to be sent.

Your visitors (and nasty spambots!) cannot see your email address.  The script cannot be hijacked by spammers.

When the form is sent, your visitor will get a confirmation of this on the screen, and will be given a link to continue to your homepage, or other page if you specify it.

Should you need the facility, you can add additional fields to your form, which this script will also process without making any additional changes to the script.  You can also use it to process other forms.  The script will handle the "POST" or "GET" methods.  It will also handle multiple select inputs and multiple check box inputs.  If using these, you must name the field as an array using square brackets, like so: <select name="fruit[]" multiple>.  The same goes for check boxes if you are using more than one with the same name, like so: <input type="checkbox" name="fruit[]" value="apple">Apple<input type="checkbox" name="fruit[]" value="orange">Orange<input type="checkbox" name="fruit[]" value="banana">Banana

** PLEASE NOTE **  If you are using the script to process your own forms (or older FormToEmail forms) you must ensure that the email field is named correctly in your form, thus: <input type="text" name="email" etc>.  Note the lower case "email".  If you don't do this, you won't be able to see who the email is from and the script won't be able to check the validity of the email.  If you are using the form code below, you don't need to check for this.

This is a PHP script.  In order for it to run, you must have PHP (version 4.1.0 or later) on your webhosting account, and have the PHP mail() function enabled and working.  If you are not sure about this, please ask your webhost about it.

SETUP INSTRUCTIONS

Step 1: Put the form on your webpage
Step 2: Enter your email address and (optional) continue link below
Step 3: Upload the files to your webspace

Step 1:

To put the form on your webpage, copy the code below as it is, and paste it into your webpage:

<form action="FormToEmail.php" method="post">
<table border="0" bgcolor="#ececec" cellspacing="5">
<tr><td>Name</td><td><input type="text" size="30" name="name"></td></tr>
<tr><td>Email address</td><td><input type="text" size="30" name="email"></td></tr>
<tr><td valign="top">Comments</td><td><textarea name="comments" rows="6" cols="30"></textarea></td></tr>
<tr><td>&nbsp;</td><td><input type="submit" value="Send"><font face="arial" size="1">&nbsp;&nbsp;<a href="http://FormToEmail.com">Form Processor</a> by FormToEmail.com</font></td></tr>
</table>
</form>

Step 2:

Enter your email address.

Enter the email address below to send the contents of the form to.  You can enter more than one email address separated by commas, like so: $my_email = "bob@example.com,sales@example.co.uk,jane@example.com";

*/

$my_email "delete these words and put the email address only in here between the quotes";

/*

Enter the continue link to offer the user after the form is sent.  If you do not change this, your visitor will be given a continue link to your homepage.

If you do change it, remove the "/" symbol below and replace with the name of the page to link to, eg: "mypage.htm" or "http://www.elsewhere.com/page.htm"

*/

$continue "/";

/*

Step 3:

Save this file (FormToEmail.php) and upload it together with your webpage containing the form to your webspace.  IMPORTANT - The file name is case sensitive!  You must save it exactly as it is named above!  Do not put this script in your cgi-bin directory (folder) it may not work from there.

THAT'S IT, FINISHED!

You do not need to make any changes below this line.

*/

$errors = array();

// Remove $_COOKIE elements from $_REQUEST.

if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}}

// Check all fields for an email header.

function recursive_array_check_header($element_value)
{

global 
$set;

if(!
is_array($element_value)){if(preg_match("/(%0A|%0D|\n+|\r+)(content-type:|to:|cc:|bcc:)/i",$element_value)){$set 1;}}
else
{

foreach(
$element_value as $value){if($set){break;} recursive_array_check_header($value);}

}

}

recursive_array_check_header($_REQUEST);

if(
$set){$errors[] = "You cannot send an email header";}

unset(
$set);

// Validate name field.

if(isset($_REQUEST['name']) && !empty($_REQUEST['name']))
{

if(
preg_match("/[^a-z' -]/i",stripslashes($_REQUEST['name']))){$errors[] = "You have entered an invalid character in the name field";}

}

// Validate email field.

if(isset($_REQUEST['email']) && !empty($_REQUEST['email']))
{

if(
preg_match("/(%0A|%0D|\n+|\r+|:)/i",$_REQUEST['email'])){$errors[] = "Email address may not contain a new line or a colon";}

$_REQUEST['email'] = trim($_REQUEST['email']);

if(
substr_count($_REQUEST['email'],"@") != || stristr($_REQUEST['email']," ")){$errors[] = "Email address is invalid";}else{$exploded_email explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) > 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == || substr_count($exploded_email[1],".") > 3){$errors[] = "Email address is invalid";}else{$exploded_domain explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $key => $value){if($key == 0){if(strlen($value) > 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}elseif(strlen($value) > || !preg_match('/^[a-z0-9]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}}

}

// Remove leading whitespace from all values.

function recursive_array_check(&$element_value)
{

if(!
is_array($element_value)){$element_value ltrim($element_value);}
else
{

foreach(
$element_value as $key => $value){$element_value[$key] = recursive_array_check($value);}

}

return 
$element_value;

}

recursive_array_check($_REQUEST);

// Check referrer is from same site.

if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";}

// Check for a blank form.

function recursive_array_check_blank($element_value)
{

global 
$set;

if(!
is_array($element_value)){if(!empty($element_value)){$set 1;}}
else
{

foreach(
$element_value as $value){if($set){break;} recursive_array_check_blank($value);}

}

}

recursive_array_check_blank($_REQUEST);

if(!
$set){$errors[] = "You cannot send a blank form";}

unset(
$set);

// Display any errors and exit if errors exist.

if(count($errors)){foreach($errors as $value){print "$value<br>";} exit;}

if(!
defined("PHP_EOL")){define("PHP_EOL"strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" "\n");}

// Build message.

function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");}

$message build_message($_REQUEST);

$message $message PHP_EOL.PHP_EOL."-- ".PHP_EOL."Thank you for using FormToEmail from http://FormToEmail.com";

$message stripslashes($message);

$subject "FormToEmail Comments";

$headers "From: " $_REQUEST['email'];

mail($my_email,$subject,$message,$headers);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
<title>Form To Email PHP script from FormToEmail.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#ffffff" text="#000000">

<div>
<center>
<b>Thank you <?php print stripslashes($_REQUEST['name']); ?></b>
<br>Your message has been sent
<p><a href="<?php print $continue?>">Click here to continue</a></p>
<p><b>FormToEmail</b> by <a href="http://FormToEmail.com">FormToEmail.com</a></p>
</center>
</div>

</body>
</html>
Cheers and enjoy at the forums. got to go 2 bed
Reply With Quote
  #14 (permalink)  
Old Aug 7th, 2007, 01:42
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

Someone gave me this when my site was being critiqued! Love this!
Email Encoder
Reply With Quote
  #15 (permalink)  
Old Aug 7th, 2007, 08:25
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 723
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email linking

yea thats the one I use to!

I linked it on my post above but for some reason it hasn't printed!
Reply With Quote