• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

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
0
rellik
Asked:
rellik
  • 2
  • 2
  • 2
  • +1
1 Solution
 
chrisboltCommented:
http://www.worldwidemart.com/scripts/formmail.shtml

I am not sure if it lets you attach files though...
0
 
palanvinodCommented:
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
0
 
sdjjmCommented:
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.
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
rellikAuthor Commented:
He didn't answer the question, he just refered me to web page that talks about submitting form mail.
0
 
sdjjmCommented:
I posted a Perl script last week that will take input  from an HTML form, parse the data,  and generate email using sendmail.   It works well, and  you can add the MIME routines to it if you want to attach a file..   If you want to use Perl, you can find the script at:

http://www.experts-exchange.com/Q.10115095

0
 
rellikAuthor Commented:
Thanks!
0
 
palanvinodCommented:
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
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now