|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi,
i have an HTML form with two Text areas and a button. After I type the contents into the Text Area, if I press the Button, a mail should be sent to a default person with the message containing the contents of the text areas. How can I do it with perl? Cant I do it with client side JavaScript? |
|
#2
|
|||
|
|||
|
Here:
#!/usr/bin/perl use CGI; $query = new CGI; $first_textarea_data = $query->param('textarea_a'); $second_textarea_data = $query->param('textarea_b'); $mailer = "/path/to/sendmail"; unless(open(MAIL, "|$mailer -t")) { print "Unable to open sendmail at: $mailernn"; exit; } print MAIL "TO: recipient@some.comn"; print MAIL "SUBJECT: This is some fine mail!n"; print MAIL "FROM: you@your.comnn"; print MAIL $first_textarea_data; print MAIL $second_textarea_data; close(MAIL); print "Location: <A HREF="http://www.foo.com/your_thank_you_page.htmlnn";" TARGET=_blank>http://www.foo.com/your_thank_you_page.htmlnn";</A> have phun. Josh |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Need to send mail with contents which is in Text areas |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|