Help - Search - Members - Calendar
Full Version: Form to Email?
MonsterSmallBusiness Forums > MonsterCommerce > How do I?
Griffin
Hello everyone,

I need a script that would be able to take form input, and send the information inputted to an email address. I've used an ASP script to do this in the past, but it's not working on this new site. Everything is being passed from the form to the script just fine, but the email never shows up. I'm just a beginner with ASP, so I'm not sure what else to troubleshoot. Anyone have one that has worked for you?

thanks,
Griffin smile.gif
Birdman
They do not support .asp mail to programs such as Cdonts. You have to use one of thiers.

Here is one I have used on our site.
Just change the info where it says yourstore to your url.


<form method="POST" action="http://formmail.monstercommerce.com/cgi-bin/ntformmail/ntformmail.pl">

<input type=hidden name="recipient" value="sales@yourstore.com">
<input type=hidden name="redirect"value="http://www.yourstore.com">
<input type=hidden name="subject" value="Info Request">


<div align="center">
<center>
<table border="0" width="420" bgcolor="#000000" cellspacing="0">
<tr>
<td width="100%">

<table border="0" bgcolor="#FFFFFF" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td width="100%" bgcolor="#C0C0C0"><font color="#000000" face="Arial Black" size="2">Contact
Us...</font></td>
</tr>
<tr>
<td width="100%">
<font face="Verdana" size="2">
Your Name: <input type="text" name="Name" size="34"> </font>
</td>
</tr>
<tr>
<td width="100%"><font face="Verdana" size="2">E-Mail Address: <input type="text" name="email" size="30"></font><font color="#CC0000" face="Verdana" size="1">*Required</font>

</td>
</tr>
<tr>
<td width="100%">
<font face="Verdana" size="2">Phone Number: <input type="text" name="phone_number" size="30"></font>
</tr>
<tr>
<td width="100%">

<p><font face="Verdana" size="2">&nbsp;How may we assist you?&nbsp;</font>
</p>
</tr>
<tr>
<td width="100%">
<textarea rows="3" name="Message" cols="45"></textarea></td>
</tr>
<tr>
<td width="100%" bgcolor="#C0C0C0">

<input type="submit" value="Submit Request" style="font-family: Arial; font-weight: bold; border: 3 solid #FFCC00">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</form>
hofei
Here it is:

1. create three hidden boxes, the recipient's value should be the email account you are sending email to, the redirect's value should be your confirmation page, and the subject's value is self-explanatory
2. Simply submit your form to the ntformmail.pl

<form name="myform" method="post" action="http://formmail.monstercommerce.com/cgi-bin/ntformmail/ntformmail.pl
">
<input type=hidden name="recipient" value="sales@yourdomain.com">
<input type=hidden name="redirect" value="http://yoursite/confirm.html">
<input type=hidden name="subject" value="APPLICATION">
<!-- your form fields below -->
</form>
Griffin
Ahhh. Thank you both so much!!! biggrin.gif
ultimatekeychains
Hmm.. I was able to upload formmail.asp to a location on my site and it works fine...
Moto-Graphics.com
GREAT Post - I also want to say thanks for the information. biggrin.gif biggrin.gif biggrin.gif biggrin.gif
Ewestforth
Thanks birdman.. i used it for people wanting to exchange links. All i had to do was add/change a few fields.
liltricky
big thanks to birdman and hofei. i've been wanting to put a contact form on my contact page for sometime now. now my users can contact me easier.

smile.gif
Hobby Scene
Griffin
Are there any more fields I can have in there? I want to be able for the customer to input their address too. If not, I'll just instruct them to input it in the comments area.

thanks!
robert
Ewestforth,

Would you be willing to post your code for the email form you use for link exchange requests? It is a wonderful page, and I tried to emulate you, but there is too much "noise" on the page when I copy the source code for the entire page.

Thanks!

pressuremart
Hello,

How can you make a field truly "required" and creating a pop-up window to appear stating which field has not been entered properly etc.?? This would help with getting the required info on our forms.

Thanks!!
Jim
adminguy
QUOTE

Hmm.. I was able to upload formmail.asp to a location on my site and it works fine...


Please keep in mind that sort of thing is not advisable. We are really trying to move/push more on the fact that we are at the core an ASP as opposed to a vhosting company that just happens to have a shopping cart.

As per a previous post or newsletter item (I may be wrong but I seem to recall it), our policies on FTP/FP access, customization, etc, etc are changing and *will* be enforced for the post migration 4.x environment. A huge part of this is that we tend to get customers who upload their own code, heavily modify ours, etc, etc.....often times do not tell us, and then as the server their site is on bogs down or encounters problems, we need to find and isolate the specific problem which at that point is usually no small task.

What I would really like to see would be questions like this asked and we ( monstersmile.gif ) tech people provide customers with solutions. This by no means has to be fee-based or anything, if there is say a common demand for an alternate form mail solution, then we will most likely come up with another one and make it available to all for free, etc, etc.

robert
Adam,

After the migration hassles are over, would it be possible to have some sort of form-generation wizard? Perhaps we click on the boxes for the fields we would like to include and the code could be generated?

Some people want to use forms to get feedback from their customers. I would like to use forms to get the info I need from folks who want to exchange links. Others probably have different needs.

I can only imagine the horrors that us novices can create! It would be better to "let monstersmile.gif do it"!

adminguy
Great idea Robert....we have something more along the lines of an asp based version of formmail, but I really do like the idea of being able to dynamically generate the form to control both the recipient/sender and the fields the form will allow to be submitted.

I will see what we can come up with....obviously anything with an interface could take some time, but I should have some idea in the next couple of days.
robert
Excellent!
cbhale
This would be yet another great add on to the already feature rich software!

biggrin.gif
pressuremart
QUOTE (Birdman @ May 30 2003, 05:07 PM)
They do not support .asp mail to programs such as Cdonts. You have to use one of thiers.

Here is one I have used on our site.
Just change the info where it says yourstore to your url.


<form method="POST" action="http://formmail.monstercommerce.com/cgi-bin/ntformmail/ntformmail.pl">

<input type=hidden name="recipient" value="sales@yourstore.com">
<input type=hidden name="redirect"value="http://www.yourstore.com">
<input type=hidden name="subject" value="Info Request">


<div align="center">
<center>
<table border="0" width="420" bgcolor="#000000" cellspacing="0">
<tr>
<td width="100%">

<table border="0" bgcolor="#FFFFFF" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td width="100%" bgcolor="#C0C0C0"><font color="#000000" face="Arial Black" size="2">Contact
Us...</font></td>
</tr>
<tr>
<td width="100%">
<font face="Verdana" size="2">
Your Name: <input type="text" name="Name" size="34"> </font>
</td>
</tr>
<tr>
<td width="100%"><font face="Verdana" size="2">E-Mail Address: <input type="text" name="email" size="30"></font><font color="#CC0000" face="Verdana" size="1">*Required</font>

</td>
</tr>
<tr>
<td width="100%">
<font face="Verdana" size="2">Phone Number: <input type="text" name="phone_number" size="30"></font>
</tr>
<tr>
<td width="100%">

<p><font face="Verdana" size="2">&nbsp;How may we assist you?&nbsp;</font>
</p>
</tr>
<tr>
<td width="100%">
<textarea rows="3" name="Message" cols="45"></textarea></td>
</tr>
<tr>
<td width="100%" bgcolor="#C0C0C0">

<input type="submit" value="Submit Request" style="font-family: Arial; font-weight: bold; border: 3 solid #FFCC00">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</form>

Hello Birdman,

Thanks for the help on this, it works great. smile.gif

How can you make a field truly "required" and create a pop-up window to appear stating which field has not been entered properly etc.?? This would help with getting the required info on our forms.

Thanks!!
Jim
Barbiro
Hi smile.gif This post is kind of old but very useful. I hope you're still around since you might be able to help me with a question.

The form works great, but the results are received in "text" format. Is there any way to code it so the results are received in "html format"?

Thanks for your help.
Neil82591
I personally have not found a way to send in html format but if someone knows it would be great.

smile.gif
blackjackinc
First let me say that I think that the formmail that is provided does not give us enough customization options, so I host my own formmail scripts on a remote server. I think it's kind of silly that I can host perl scripts on a el cheapo 5 dollar a month shared server at some webpace reseller, but I can't host them on my own dedicated several hundred dollar a month server at monstersmile.gif.

HTML email is simply email that has been sent with "Content-type: text/html" in the headers, but formmail doesn't allow you to add other stuff to the header, so you have to spoof it.

In your form, set your email address (which is specified by the 'email' value in your form to "you@yourdomain.com\nMIME-Version: 1.0". Then set the subject to "some subject\nContent-Type: text/html". Then send some html as the body of your email. This can be done by creating some value in your form, you can call it anything such as "body" or "message" and adding some html.

I'm not positive it works because I haven't tried it. There may be some security checks in formmail that prevents this. If you use formmail for several things, as I do, (sweepstakes entries, ecards, etc.) you might consider remote hosting of your scripts.
Neil82591
Hey do any of the gurus know if what Sean stated above will work with Formail......... formail documentation is real lite.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.