I am using Pugdog's Recommend_It script, and it works great. I am, however, looking to add a modification that will e-mail me a confirmation of recommended links. We're just looking to audit the use of this feature.
I am assuming that I need to add something to sub send_sendmail in Mailer.pm.
I tried the following, but received a software error:
open ($s, "|$self->{'sendmail'}");
print $s "To: ", $LINKS{db_admin_email}, "\n";
print $s "From: ", $self->{'from'}, "\n";
print $s "Reply-to: ", $self->{'reply'}, "\n" if self->{'reply'};
print $s $self->{'headers'}, "\n" if $self->{'headers'};
print $s "X-Mailer: Mailer::$VERSION (http://www.gossamer-threads.com/scripts/)\n";
print $s "Subject: ", $self->{'subject'}, "\n\n";
print $s $self->{'msg'};
close $s;
}I put this in between the end of the primary mailing code and:L
return 1;Can someone let me know what my problem is? :)
Thanks.
I am assuming that I need to add something to sub send_sendmail in Mailer.pm.
I tried the following, but received a software error:
Code:
if ($self->{'subject'} eq 'Site Recommendation') { open ($s, "|$self->{'sendmail'}");
print $s "To: ", $LINKS{db_admin_email}, "\n";
print $s "From: ", $self->{'from'}, "\n";
print $s "Reply-to: ", $self->{'reply'}, "\n" if self->{'reply'};
print $s $self->{'headers'}, "\n" if $self->{'headers'};
print $s "X-Mailer: Mailer::$VERSION (http://www.gossamer-threads.com/scripts/)\n";
print $s "Subject: ", $self->{'subject'}, "\n\n";
print $s $self->{'msg'};
close $s;
}
Code:
$self->log_msg() or return undef; return 1;
Thanks.