77 users online (0 members and 77 guests)  

Thread: Email Text File

  Results 1 to 2 of 2


  1. Form submission to email an Excel file.    Forum: Website Scripts Forum
    Replies: 1
  2. Form submission email an excel file.    Forum: ASP Forum
    Replies: 0
  3. extracting comments from text file    Forum: PHP Forum
    Replies: 4
  4. Replies: 0
  5. Forms - email management & flat file databases    Forum: Website Scripts Forum
    Replies: 1
  1. #1
    ScottB's Avatar
    New User

    Join Date
    Dec 2001

    Question Email Text File

    Ok, here is the deal.

    I have a CGI script that simply takes input from a form and emails me the results. I need to change the script so that it takes the input, puts it into a flat txt file and attaches that file to an e-mail to me. I have included the original code to give you an idea of whats going on. I am very new to CGI and need some help.

    TIA, Scott

    use CGI qw(:standard);

    open (MAIL,"|$mailprog -t");
    @values = split(/&/,$ENV{'QUERY_STRING'});
    print MAIL "To: $recipient\n";
    print MAIL "Subject: VC Registration/Confirmation\n\n";
    foreach $i (@values) {
    ($varname, $mydata) = split(/=/,$i);
    @values2 = split(/%20/,$varname);
    foreach $y (@values2) {
    print MAIL "$y ";
    print MAIL "=";
    @values3 = split(/%20/,$mydata);
    foreach $x (@values3) {
    print MAIL " $x";
    print MAIL "\n";

    print "Location:http://www.mckissock.com/onlineseminars/thank_you.htm\n\n";

  2. #2
    QuietDean's Avatar

    Join Date
    Oct 2000
    Bournemouth, UK
    Ah, Perls not my thing. I'm a php person.

    Try - http://www.hotscripts.com

    they have loads of perl scripts there, might find one that suits your needs.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

Tags for this Thread