PDA

View Full Version : Auto-reply on-submit



Visubalan
January 30th, 2003, 03:44 PM
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

DDD
January 30th, 2003, 03:51 PM
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.

Visubalan
January 30th, 2003, 04:00 PM
Thanks a lot... i found a bunch of em...

lostinbeta
January 30th, 2003, 04:04 PM
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 )

rynoe
January 31st, 2003, 10:35 PM
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?

Pewter
February 1st, 2003, 02:41 AM
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 for the functions and some various examples...

lostinbeta
February 1st, 2003, 02:43 AM
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)

DDD
February 1st, 2003, 11:01 AM
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

lostinbeta
February 1st, 2003, 12:09 PM
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.

Visubalan
February 2nd, 2003, 12:20 AM
Hey 3d-iva,

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

Thanks

DDD
February 2nd, 2003, 11:46 AM
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.

DDD
February 2nd, 2003, 06:14 PM
Here is the code for email. Have the action on your form point to separate page with only this code on it.....no html ..






<% 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>"
%>

Visubalan
February 3rd, 2003, 08:27 AM
Thanks a lot....

Pewter
February 4th, 2003, 01:09 AM
ug..objects..

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