Link to home
Start Free TrialLog in
Avatar of fetiller
fetillerFlag for Spain

asked on

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?
Avatar of webwoman
webwoman

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?
Avatar of fetiller

ASKER

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.
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.
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.

ASKER CERTIFIED SOLUTION
Avatar of webwoman
webwoman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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