Solved

How to send e-mails from a form.

Posted on 2002-05-13
7
187 Views
Last Modified: 2013-12-24

Hi all,

I'm trying to build a form where the user should be able to specify some e-mail adresses and send the form fields to this adresses.

I can set one or more e-mail adresses, code below you can read s-mail-address="me@me.com", this is the address i write when i'm designing the form, but i would like to send the form to any other addresses users could write on Field TO.

I have this code generated by Frontpage.


<FORM METHOD="POST" ACTION="--WEBBOT-SELF--" onSubmit="">
<!--webbot bot="SaveResults" s-email-address="me@me.com" s-email-format="TEXT/PRE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><TABLE width="514">
<TR>
<TD ALIGN="right" width="191">
<p><em>TO:</em></TD>
<TD width="329">
<INPUT TYPE=TEXT NAME="E-MAIL" SIZE=45>
</TD>
</TR>
</TABLE>
<TABLE width="514">
<TR>
<TD ALIGN="right" width="174">
<p align="left"><em>CLIENT:</em></TD>
<TD width="331">
<INPUT TYPE=TEXT NAME="CLIENT" SIZE=45>
</TD>
</TR>
</TABLE>
<TABLE width="513">
<TR>
<TD ALIGN="right" width="173">
<p align="left"><em>SUBJECT:</em></TD>
<TD width="330">
<INPUT TYPE=TEXT NAME="SUBJECT" SIZE=45>
</TD>
</TR>
</TABLE>
<P align="left">
<i>MESSAGE:</i></P>
<BLOCKQUOTE>
<P align="left">
<TEXTAREA NAME="MESSAGE" ROWS=7 COLS=61></TEXTAREA>
<BR>
</P>
<blockquote>
  <blockquote>
    <blockquote>
      <blockquote>
        <blockquote>
          <p align="center">
<INPUT TYPE=submit VALUE="SEND" style="float: left"><INPUT TYPE=reset VALUE="CLEAR" style="float: left"></p>
        </blockquote>
      </blockquote>
    </blockquote>
  </blockquote>
</blockquote>
</BLOCKQUOTE>
</FORM>

Any idea on how to do it?
0
Comment
Question by:fetiller
7 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 7008797
You'll probably have to custom code it. I doubt it's in any of the FP wizards.

How comfortable are you with ASP/HTML?
0
 
LVL 1

Author Comment

by:fetiller
ID: 7008919
Not bad on HTML, already tried to do it in ASP with the CDONTS, but do not worked, now i'm looking for some CGI hosted remotely.

Also tried to custom the HTML code but can't figure out out how to send to all the recipients written on the form just with html...

I'm starting to think that simple HTML is not enough, will keep trying to find a CGI.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 7009007
You're not using 'simple HTML' -- you're using pre built FP components. If your server supports FP extensions (if the form works, it does), then there may have been problems with your ASP.

And have you tried changing the to address? What happens then?

It's very possible that the server is set up to not allow forms to be sent to addresses outside the domain. That would be reasonable -- it would be way too easy for somebody to use the site for spamming otherwise.

If that's the case, changing to a CGI/perl solution isn't going to help. Check with whoever hosts your site, find out if they restrict form submission. I'll bet they do.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 1

Author Comment

by:fetiller
ID: 7009142
Webwoman,

The problem is not on the smtp server we're using to host our site, i already changed the address to a hotmail account and it works, the problem is that i have to set the address where the e-mail will be recieved and cannot get the addresses typep by users on the form and send an e-mail to those addresses.

I'm sorry, prolly my english is worst than what i though :).

I just found a remotely hosted CGI that is working, but still would like to know how to do it without that CGI, so i'll keep trying your comments.

0
 
LVL 19

Accepted Solution

by:
webwoman earned 100 total points
ID: 7009901
You'll need to do it yourself, I don't think the wizards are set up that way. It's not hard to code an ASP page to process your form, then you can make it do whatever you need.

Check www.asp101.com they have some very good tutorials and sample scripts there. You'd need to customize them, but not much.

That would allow you to not only use the address input by the user, but other fields as well, and even redirect them to specific pages based on what they enter or choose in the form. Much more flexible than what you can do with the wizards.
0
 
LVL 4

Expert Comment

by:victorus
ID: 7052891
Just a little comment here...

I have found that it is very simple to do this using a little PHP script. Most servers carry the PHP daemon processor and the coding in very simple. Also the server does very little work to process the code so SSI's are not necessarily needed.

The PHP code is insert in the HTML tab of the program with a START SPAN and END SPAN tag which makes it disappear in the preview pane. I always put mine in a table so at least I can see it in the preview window.

Lastly, there are a bunch of free source code programs that do exactly what you are trying to do. Just do a net search for "PHP e-mail program" and you will see a bunch.

Good Luck,
Vic
0
 
LVL 29

Expert Comment

by:coreybryant
ID: 8985888
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split between webwoman and victorus
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

coreybryant
EE Cleanup Volunteer
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question