Sendmail  [usually] runs as a local daemon, and by connecting to and using it, your script passes off some of the finer points of email processing to that daemon [retries, for example]. While you certainly CAN connect directly with a remote mail server using SMTP from a CGI script, I must ask if you are prepared to beef up the CGI script to handle all of the exceptional conditions sendmail used to handle for you?<br>
<br>Christian<br><br><br><br><div class="gmail_quote">On Thu, Aug 4, 2011 at 2:12 PM, Ken Zeran <span dir="ltr"><<a href="mailto:ken@kennethzeran.com">ken@kennethzeran.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>

  

    
  
  <div bgcolor="#ffffff" text="#000000">
    Hello- I am definitely not a programmer but I am definitely an
    admirer of those who do. <br>
    I need help. I spoke with Tim Maher and he sent me here.<br>
    <br>
    I have a cgi written in PERL that processes a form that includes
    sending out email. The script works fine however it needs to be
    CHANGED from using SENDMAIL to SMTP. The HTML points to the cgi and
    on submit utilizes send_msg_to_list.<br>
    <br>
    Below are those snippets from the script with references to
    SENDMAIL.<br>
    <br>
    Can anyone help??<br>
    <br>
    Thank you.<br>
    <br>
    Ken <br>
    <a href="tel:206-362-5000" value="+12063625000" target="_blank">206-362-5000</a><br>
    <br>
    <dl>
      <dd> <br>
      </dd>
    </dl>
    <br>
    Mail server is <a href="http://smtp.fatcow.com" target="_blank">smtp.fatcow.com</a><br>
    <br>
    <br>
    send_msg_to_list<br>
    <br>
    ##################################<br>
    <br>
    # path to sendmail<br>
    my $SENDMAIL = '/usr/sbin/sendmail';<br>
    <br>
    ###################################3<br>
     <br>
    <br>
    open (SENDMAIL, "|$SENDMAIL -t") <br>
            or print_error ("Couldn't open [$SENDMAIL]: $!");<br>
    <br>
        my $body = &make_email_body();<br>
        my $subject = $FORM::subject || "New Registrant to $type";<br>
    <br>
        my $counter = 0;     <br>
       print SENDMAIL <<EOF;<br>
    To: $DEFAULT_ADMIN_EMAIL_ADDRESS<br>
    From: $FROM_EMAIL_ADDRESS<br>
    Subject: $subject<br>
    <br>
    New Registrant(s) to $type - Postal Code <br>
    <br>
    EOF<br>
        while ($counter != $stoppoint) {<br>
    <br>
        if ($counter == 1) { print SENDMAIL "$catname1 with
    $catemail1\n"; }<br>
        if ($counter == 2) { print SENDMAIL "$catname2 with
    $catemail2\n"; }<br>
        if ($counter == 3) { print SENDMAIL "$catname3 with
    $catemail3\n"; }<br>
        if ($counter == 4) { print SENDMAIL "$catname4 with
    $catemail4\n"; }<br>
        if ($counter == 5) { print SENDMAIL "$catname5 with
    $catemail5\n"; }<br>
    <br>
        $counter = $counter + 1;<br>
    <br>
        }<br>
    <br>
        close SENDMAIL;<br>
    <br>
    }<br>
    <br>
    ################################################<br>
    <br>
    open (SENDMAIL, "|$SENDMAIL -t") or print_error ("Couldn't open
    [$SENDMAIL]: $!");<br>
    <br>
    $date =~ s/\n//g;<br>
    <br>
        print SENDMAIL <<EOF;<br>
    To: $DEFAULT_TO<br>
    Bcc: $emails<br>
    From: $FROM_EMAIL_ADDRESS<br>
    Subject: $subject<br>
    <br>
    The following information was submitted to Apartmentresponse.com by
    <br>
    $FORM::email on $date ET<br>
    <br>
    $body<br>
    .<br>
    EOF<br>
        close SENDMAIL;<br>
        <br>
    }<br>
    <br>
    <br>
    <br>
  </div>

<br>_____________________________________________________________<br>
Seattle Perl Users Group Mailing List<br>
     POST TO: <a href="mailto:spug-list@pm.org">spug-list@pm.org</a><br>
SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list" target="_blank">http://mail.pm.org/mailman/listinfo/spug-list</a><br>
    MEETINGS: 3rd Tuesdays<br>
    WEB PAGE: <a href="http://seattleperl.org/" target="_blank">http://seattleperl.org/</a><br></blockquote></div><br><br clear="all"><br>-- <br>I require any third parties to obtain my permission to submit my information to any other party for each such submission. I further require any third party to follow up on any submittal of my information by sending detailed information regarding each such submission to <a href="mailto:telcodev@gmail.com" target="_blank">telcodev@gmail.com</a><br>
Joseph Werner<br>