Advertisement

08.28.2008 at 08:27PM PDT, ID: 23687827
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.7

Upgrading a CGI to attach a file and call a page

Asked by multisites in CGI Scripting, Perl Programming Language, Scripting Languages

Hi, guys,

I have a CGI Perl Script which runs in a Linux Server with Sendmail. This Scripts subroutine which effective sends the email, is this part below. It works fine, it is quite simple. Well, now I need to include two functions in this sending:

1) First, I need to attach to this email a file which also is in the same server, called, say, image.jpg.

2) And secondly, instead of writing a text or a link in this email, as I do below, I would like to make it call an html page, so that when the receiver opens the email it will bring and show that page which is hosted in the same server.

Could anyone help me telling me what to alter in this send routine to accomplish this?

Thanks.

Mario./
____________________________________________________________
# Output the mail header
      print MAIL "To: $TO\r\n";
         print MAIL "From: $from_name\r\n";
      print MAIL "Reply-To: $from_name\r\n";
      print MAIL "Subject: $SUBJECT\r\n\n";  

# Output the mail message header with the Local Date/Time and some greetings
      if ($INCLUDE_HEADER eq "Yes") {
            print MAIL "________________________________________________________\n\n";
            print MAIL "Este email foi enviado a você por: \n";
            print MAIL "$CONFIG{'NOME'} em $date\n";
            print MAIL "________________________________________________________\n\n";
            print MAIL "Ola,\n\nEsse é um convite de \"$CONFIG{'NOME'}\" para você assistir algumas excelentes palestras a respeito de assuntos espirituais. Os temas são atuais, tem a ver com o seu dia a dia em casa, na rua, no trabalho, na faculdade, no lazer. E levam você a ter esperança de uma vida melhor e eterna.\n\n";
            print MAIL "Veja o anúncio completo das mesmas, clicando abaixo (pode clicar, nao é virus):\n\n";
            print MAIL "http:\/\/www.advir.org.br\/ped\/ped.html.\n";
            print MAIL "________________________________________________________\n\n";
      }

# Output the mail body
      foreach $pair (@pairs)
      {
                ($name, $value) = split(/=/, $pair);
                  $name =~ tr/+/ /;
                  $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
            $value =~ tr/+/ /;
                 $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
            $value =~ s/<!--(.|\n)*-->//g;
      if (($value ne "") &&
        ($name ne "DESTINO") &&
        ($name ne "HEADER") &&
        ($name ne "CONFIRMACAO") &&
        ($name ne "NOME") &&
        ($name ne "EMAIL") &&
        ($name ne "x") &&
        ($name ne "y"))
      {
      print MAIL "$name ($CONFIG{'NOME'}):\n\n";
      print MAIL "$value\n\n";
      }
     }
##
      }

# Close the pipe and send the mail
      close(MAIL);
Start Free Trial
[+][-]08.29.2008 at 09:09AM PDT, ID: 22346897

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 09:57AM PDT, ID: 22347283

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 12:27PM PDT, ID: 22348500

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 02:29PM PDT, ID: 22349409

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 02:29PM PDT, ID: 22349413

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 02:43PM PDT, ID: 22349507

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 02:46PM PDT, ID: 22349523

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 03:05PM PDT, ID: 22349618

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 03:13PM PDT, ID: 22349646

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: CGI Scripting, Perl Programming Language, Scripting Languages
Sign Up Now!
Solution Provided By: Adam314
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628