rellik
asked on
Using a CGI to submit a form via email
Does anyone have a script that will take an email address and subject entered from a form (post method) and mail the text from that form to the email address. Preferably using elm, but will settle for anything. Also, if possible, attach a .gif to the message or embed it.
This would be extremely helpful!
Thanks,
-Mike
This would be extremely helpful!
Thanks,
-Mike
I want to weather you would like to install blat on your server or and if you can then I have a solution do replay..
vinod@futurethought.net
vinod@futurethought.net
Formmail does not let you attach files. The best way to do what you want is to send a MIME complient message and encode the file in Base-64 within your Perl CGI. I have a script which does this based on the MIME routine you can find in the Perl Library.
ASKER
He didn't answer the question, he just refered me to web page that talks about submitting form mail.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
Since you can install blat on server then it is simple.
Just store the data of form in a temporary txt file and use the commannd
$mailprog="blat.exe";
$recipient="xyz\@xyz.com";
open(MAIL,"|$mailprog temp.txt -s \"subject\" -f \"$in{'email'}\" -t \"$recipient\"");
print MAIL "\n\n";
close(MAIL);
I hope the few lines of code may solve your problem
Just store the data of form in a temporary txt file and use the commannd
$mailprog="blat.exe";
$recipient="xyz\@xyz.com";
open(MAIL,"|$mailprog temp.txt -s \"subject\" -f \"$in{'email'}\" -t \"$recipient\"");
print MAIL "\n\n";
close(MAIL);
I hope the few lines of code may solve your problem
I am not sure if it lets you attach files though...