Send Mail with PHP, ASP, or Perl
This article has been added to your 'Articles to Read' list.

Finally, Perl
Chad "Cota" Workman
http://www.chadworkman.com & http://www.plaguestudio.com
Skills include: Photoshop, Flash, ASP, PHP, MS SQL, MySQL, VB, C/C+
Developer and Designer
Ok, one final server side method. For those that for some reason can't use ASP or PHP you can use Perl. Perl is one of those server side scripts that doesn't care if you're using Unix/Linux or Windows, it will run on both. There are 2 Perl files, don't worry about the "SubParse" file, just focus on the main file, "SendMail.cgi". Here's the code:
#!/usr/local/bin/perl
require "subparse.lib";
&Parse_Form;
$theMail = $formdata{'email_txt'};
$theSubject = $formdata{'subject_txt'};
$theMessage = $formdata{'message_txt'};
open (MAIL, "|/usr/sbin/sendmail -t") || &ErrorMessage;
print MAIL "To: $theMail \nFrom: $theMail\n";
print MAIL "Subject: $theSubject\n";
print MAIL "$theMessage\n";
close (MAIL);
print "Content-type: text/html\n\n";
Print "&server_mes=ok";
sub ErrorMessage {
print "&server_mes=Fail";
exit; }
So there you have it. Sending mail through flash with 3 methods. Which to use it completely up to you. Modifying the code is fairly easy if you just follow the blue prints that have been laid out for you.
Spread The Word
Attachments
9 Responses to "Send Mail with PHP, ASP, or Perl" 
|
said this on 22 Feb 2007 6:39:28 PM CST
Not bad....
Remember tu Could have been ni |
|
said this on 22 Apr 2007 3:53:53 AM CST
Code doesn't work
stat Tested p |
|
said this on 22 Apr 2007 12:06:10 PM CST
Most likely a server issu
|
|
said this on 25 Apr 2007 8:57:35 PM CST
Script works great only m
PHP code has $to = should read $to = &# Your var should not |
|
said this on 23 May 2007 2:41:56 AM CST
great! but u have error i
if (!email_t it sh if &# |
|
said this on 12 Jun 2007 2:06:09 PM CST
Very well written with lo
|
|
said this on 17 Jun 2007 11:18:01 AM CST
Couldn't get it to wo
|
|
said this on 23 Jul 2007 8:29:06 AM CST
I couldn't get this t
|
|
said this on 07 Nov 2007 11:14:11 AM CST
edit for ASP:
objmail.Fr objma ob objmail.Body = re |



Author/Admin)