Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

How to send e-mails from a form.


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
fetiller
Asked:
fetiller
1 Solution
 
webwomanCommented:
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
 
fetillerAuthor Commented:
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
 
webwomanCommented:
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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
fetillerAuthor Commented:
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
 
webwomanCommented:
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
 
victorusCommented:
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
 
coreybryantCommented:
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now