Solved

Using a CGI to submit a form via email

Posted on 1998-12-22
7
164 Views
Last Modified: 2012-05-04
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
Comment
Question by:rellik
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 2

Expert Comment

by:chrisbolt
ID: 1207085
http://www.worldwidemart.com/scripts/formmail.shtml

I am not sure if it lets you attach files though...
0
 

Expert Comment

by:palanvinod
ID: 1207086
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
 
LVL 1

Expert Comment

by:sdjjm
ID: 1207087
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:rellik
ID: 1207088
He didn't answer the question, he just refered me to web page that talks about submitting form mail.
0
 
LVL 1

Accepted Solution

by:
sdjjm earned 200 total points
ID: 1207089
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
 

Author Comment

by:rellik
ID: 1207090
Thanks!
0
 

Expert Comment

by:palanvinod
ID: 1207091
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
hard perl script 16 154
How to send output of ping to syslog (with timestamp and optional comments) 3 186
add a syntax to a csv file 8 98
quoting a comma separated list 20 81
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now