# Auto-reply on-submit

**URL:** <https://forum.kirupa.com/t/auto-reply-on-submit/12403>\
**Category:** programming\
**Created:** [January 30, 2003, 8:44pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403 "2003-01-30T20:44:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Visubalan](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@Visubalan](https://forum.kirupa.com/u/Visubalan)\
**Post date:** [January 30, 2003, 8:44pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/1 "2003-01-30T20:44:34Z")

</div>

Hi all,

I am trying to set-up a form in html which should email the contents, and also a automatic reply to the user(Person who submitted the form) confirming the delivery. I don’t have perl installed in the server. Is this possible without perl. If so please lemme know or point me some links where i can find some info.

Thanks

Visu

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 30, 2003, 8:51pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/2 "2003-01-30T20:51:26Z")

</div>

You can use ASP and CDONTS. It is very easy to set up the code. do a google search for ASP CDONTS and you will have all the tuts you need.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 30, 2003, 9:00pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/3 "2003-01-30T21:00:39Z")

</div>

Thanks a lot… i found a bunch of em…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 30, 2003, 9:04pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/4 "2003-01-30T21:04:45Z")

</div>

I think you can do it with PHP as well.

I am moving this to the Server-Side/Scripting section since that is where it belongs.

(right now it is in the Other Vector Applications \> Other section )

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 1, 2003, 3:35am UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/5 "2003-02-01T03:35:55Z")

</div>

I’d be surprised if a server had php and not perl. I am also surprised there is no perl. Is there a cgi bin?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 1, 2003, 7:41am UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/6 "2003-02-01T07:41:37Z")

</div>

> \*Originally posted by lostinbeta \*  
> \*\*I think you can do it with PHP as well.

I am moving this to the Server-Side/Scripting section since that is where it belongs.

(right now it is in the Other Vector Applications \> Other section ) \*\*

yea, you should be able to bust that out in php fairly easily…(I _hope_) I haven’t worked with the emailing functions in php, but I’m sure you can just search [www.php.net](http://www.php.net) for the functions and some various examples…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 1, 2003, 7:43am UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/7 "2003-02-01T07:43:13Z")

</div>

I built the PHP form on my site. It took me 2 days.

I am a total PHP n00b though so I don’t want to act like I know how to get it to send 2 e-mails…lol.

(although I am guessing it would work just by adding another mail() function, but like I said… I have no clue)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 1, 2003, 4:01pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/8 "2003-02-01T16:01:19Z")

</div>

To do it in ASP is like 7 lines of code and you can send it in html form so you can make real pretty forms just as easy let me know if you need help. I have a email form on my site done in asp took me like 10 minutes

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 1, 2003, 5:09pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/9 "2003-02-01T17:09:48Z")

</div>

Well PHP you can do the same. If it works the way I am thinking it is few lines of code.

It took me 2 days to write my form because I just started learning PHP and I added my own required fields script, e-mail validation, and subject line area.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 2, 2003, 5:20am UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/10 "2003-02-02T05:20:57Z")

</div>

Hey 3d-iva,

If u could help that would be great. Can i use your code…

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 2, 2003, 4:46pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/11 "2003-02-02T16:46:45Z")

</div>

No prob dude!! Hey I will post it when I get back. On my way to church. Take a look at my site and tell me if that is a similar form that you are talking about. And do you want the feedback in html or formatted text. be back in a couple of hours.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 2, 2003, 11:14pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/12 "2003-02-02T23:14:46Z")

</div>

Here is the code for email. Have the action on your form point to separate page with only this code on it…no html …

```php

<% Option Explicit
dim objEmail
Set objEmail = CreateObject("CDONTS.Newmail")
objEmail.From = Request.Form("requiredemail")
objEmail.To = "you@you.com"
objEmail.Subject = "What ever you want the subject to be"
objEmail.Body = " Request.Form("form element here") & vbcrlf & _
'be sure to put all the form element with Request.Form("element")
'if you want line breaks in the format use this & vbcrlf & _

objEmail.Send

Set objEmail = Nothing

'this code down here initiates when the email is sent this can be anything you want. If you wanna send your user to a new page then use Response.Redirect("url") other wise pput what you wish here.

Response.Write"<html><head><title>Confimation</title><body><center><table width=300 border=0 cellspacing=0 cellpadding=0 style=border-collapse: collapse; border-top: 1px solid black; border-bottom: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; font-family: verdana, arial; font-size: 10px; color: #000033; background-color: #e9e9e9;><tr align=center><td colspan=3><table width=275 border=0 cellspacing=5 cellpadding=5><tr align=center><td colspan=3><font size=-1>Thank You Your message was sent:</font></td></tr><tr><td>&nbsp;</td><td align=center onClick=javascript:self.close();><font size=-1><strong>.:close this window:.</strong></font></td><td>&nbsp;</td></tr></table></td></tr></table></center></body></head></html>"
%>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 3, 2003, 1:27pm UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/13 "2003-02-03T13:27:07Z")

</div>

Thanks a lot…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 4, 2003, 6:09am UTC](https://forum.kirupa.com/t/auto-reply-on-submit/12403/14 "2003-02-04T06:09:29Z")

</div>

ug…objects…

/me is doing classes in c++ and hates it
