Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Calling a ".baut" file from "automessage"

    Hi everyone,

    I am in need of help. I was recently requested to make some changes to a friend's web site. One of the requested changes was to expand on the email that is autoreturned from a submitted form.

    I am very new to Perl and web design, but have been able to swim my way through many of the CGI files the original web designer has used, and have a beginner's handle on html.

    Here is the problem:

    Within two of the html documents for this site appears the following code (html)

    <input type="HIDDEN" name="automessage" value="mymessage">

    The file (mymessage.baut) that is called from the cgi-bin is very plain and we want to dress this up with graphics and additional text.

    What I cannot figure out is what program (Perl?) was this file written in that has a ".baut" extension?

    Would I be better off creating an html file that will include all my graphics and text and call that instead? If so what type of code adjustments should I make so the html document shows up in the email

    Thanks for any help and patience with a beginner.

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Don't worry about file extensions, on a UNIX/Linux system they often don't make too much difference to how a program is executed half the time but they can provide useful mnemonics.

    For example, I often create template files and give them a .tmpl extension so that I can:
    a) Forbid any requests from the browser to template files
    and
    b) Easily identify them in a file listing.

    As for dressing up the automatic message a bit, it's hard to say without some example code to work on, but I think all you need to do is change the mymessage.baut file to HTML code, and to add a text/html MIME header to the email. Post some of the code

    I've got a feeling that the previous webdesigner's code might patching from a security point of view, by the way, depends on how careful he was with the 'automessage' value.

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks for the response - long post

    I appreciate your help.

    The original form/email handling script is from BigNoseBird (bnbform.cgi)

    I posted my question at their forum also. With that help also, I was able to at least change the text of the "mymessage.baut" file with Notepad only, because this particular file handles straight text only according to the person who responded to my question. This person also said that there may be a possibility (but not sure how) to be able to add graphics to this file, but said using anything other than Notepad (which does not accept graphics) will FUBAR the rest of the cgi code.

    Because the bnbform.cgi is a free cgi, and I am so new to this area of work I am not sure about the security issues.

    I will experiment with your suggestion about creating an html for the email and include the text/html MIME header and see what happens.

    Thanks again for your help.

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The easiest way to go about this is definitely to make the content of the responder file to just be HTML.

    You'll need to insert a MIME-type line here:
    Code:
    print MAIL "To: $to\n";
    print MAIL "From: $fromaddr\n";
    print MAIL "Reply-to: $replyaddr\n" if $replyaddr;
    print MAIL "X-Mailer: Perl Powered Socket Mailer\n";
    print MAIL "Subject: $subject\n\n";
    So that it becomes:
    Code:
    print MAIL "To: $to\n";
    print MAIL "From: $fromaddr\n";
    print MAIL "Reply-to: $replyaddr\n" if $replyaddr;
    print MAIL "X-Mailer: Perl Powered Socket Mailer\n";
    print MAIL "Subject: $subject\n";
    print MAIL "Content-type: text/html\n\n";
    And then just change the content of the file to whatever you like, you can add images as you would in a normal webpage like:

    <IMG SRC="http://www.yourserver.com/images/monkey.jpg">

    And it should all work nicely...

    By the way, the security issues were fine, nothing to worry about I don't think.

    As for the whole NOTEPAD issue, what the other person meant most probably was that it's just a plain text file, nothing more. You don't have to use NOTEPAD, there are plenty of great editors around which are far superior... personally speaking I like UltraEdit 32 - it's a lovely hex editor too.

    Hope that helps.

  • #5
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excellent

    You have been great. Thank you for all your help.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •