Email this to a friend and/or e-postcards

G

Guest

I have a website created in FrontPage with a very simple Access database for
collecting names/addresses for people wanting to receive newsletters etc.

We would like to enhance this option to include a "email this to a friend"
feature whereby the sender enters in their name, email address, their
friend's name and email address. An email is then sent from the site
inviting the recipient to view a specific page within the site.

How to create the "email to a friend" is problem number one but in the ideal
world I would like the email addresses (sender & recipient) to be stored
within the existing database.

Any help/suggestions will be appreciated. Thanks in advance.
 
T

Thomas A. Rowe

FYI: You will run into a privacy issues storing the recipient email address in your database, and
the senders unless they are a registered users of your site and are required to provide a email
address as part of the registration process.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
G

Guest

Thanks Thomas, the privacy issue is something we are looking in to.
Personally I think the "email a friend" feature is good but then to encourage
the visitor to register for special offers etc. Thus we have 'qualified'
registrations and not just random details stored!

In the meantime though I still need to locate a script for generating the
email from the site.

Thanks
 
T

Trevor L.

Woodley said:
Thanks Thomas, the privacy issue is something we are looking in to.
Personally I think the "email a friend" feature is good but then to
encourage the visitor to register for special offers etc. Thus we
have 'qualified' registrations and not just random details stored!

In the meantime though I still need to locate a script for generating
the email from the site.

Thanks

Did you get my post?

I haven't used a database, but I have written simple js to write an email,
avoiding the FP supplied Email handler or any commercial programs. No need
for FP Server Extensions.
 
G

Guest

Hi Trevor, no sorry I didn't receive your post. I am v.new to the discussion
groups so this in itself is a learning curve! I'd certainly like to see the
js though.

Thanks
 
T

Trevor L.

Woodley said:
Hi Trevor, no sorry I didn't receive your post. I am v.new to the
discussion groups so this in itself is a learning curve! I'd
certainly like to see the js though.

Thanks

Sorry,
I forgot to add that my post was to another query, not to yours, but it had
a very similar topic.

It can be difficult browsing the newsgroup to find queries that you are
interested in.

I use Outlook Express to read the NG. All new messages are marked, so I can
read them, delete those of no interest, keep (and possiblty reply to) those
that are, and move ones with info that could be future use to other folders.

This is some HTML and JS to create an email from a form.
I have tried to cut out the extraneous stuff so I hope it still works.

<script type="text/javascript">
function checkEmailAddress(field)
{
// the following expression in () after 'match' must be all on one line...
if
(field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi))
return true
else
{ alert('Please enter a valid e-mail address.')
field.focus()
field.select()
return false }
}
// --------------------
function testform()
{
with (document.form1)
{
if (!checkEmailAddress(Email))
return
// Add any other validity checks in here
}
}
// --------------------
function sendform()
{
with (document.form1)
{
var body = ''
var i = elements.length , j = 0
while (i-- > 2) // drop last two elements - "submit" and "reset"
{
var text = (elements[j].checked) ? 'Yes' : elements[j].value
// converts radio button answers to 'Yes'
if (text != 'on')
{
var tname = elements[j].name
body += tname
if (tname == "Comment")
body += '%0d%0a' // line break before comment text
body += text + '%0d%0a' // line break after each line of text
} // end if
j += 1
} // end while
} // end with

window.location = "mailto:" + "username" + "@" + "domain" + ".com"
+ "?subject=Response%20from%20Form1"
+ "&body=" + body
}
// --------------------
</script>

<form name="form1" action="">
<div style="background-color:#DBE0F5; padding:3px; font:75% arial;">
<b>Title</b>
</div>

<div style="padding:10px; font:75% Arial; text-align:left;">
<p>
Hi all,<br />
Some introductory text
<br /><br />

<p>
Name:<br/>
<input type="text" id="Name" value="Insert name" size="40"
onfocus="if (this.value=='Insert name'){this.value='';};return
false;"
onblur="if (this.value==''){this.value='Insert name';return
false;}"/><br/>

Email:<br/>
<input type="text" id="Email" value="Insert e-mail address" size="40"
onfocus="if (this.value=='Insert e-mail
address'){this.value='';};return false;"
onblur="if (this.value==''){this.value='Insert e-mail
address';return false;}"/><br/>

A question with a Yes/No radio button? <br/>
<input type="radio" name="yesno" />Yes <br/>
<input type="radio" name="yesno" />No <br/>

<!-- Add other questions in here -->

Enter Comment:<br/>
<textarea id="Comment" rows="10" cols="100"
style="font:100% Arial;">Enter your comment in
here</textarea><br />
</div>

<div align="center" style="background-color:#DBE0F5; padding:3px;
font:12px arial;">
<input type="button" id="submit" value=" Send "
onmouseover="testform()" onclick="sendform()" />
<input type="reset" id="reset" value=" Clear "/>
</div>
</form>
 
T

Thomas A. Rowe

The sites that I have created that have this function never store the sending or recipient's email
addresses since they are mainly eCommerce sites.

However, if you have users that must register, you can restrict this function to those that have
registered and logged in, but do not store the recipient email address, because you do not have
their permissions.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
G

Guest

I have come to the conclusion that we will just have a "tell a friend" form
which generates an email recommending their freind to our site but without
storing any details. Certainly don't want any privacy issues!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top