Gossamer Forum
Home : Products : Links 2.0 : Customization :

problen news letter

Quote Reply
problen news letter
hi

I have a problem when I send letter or this problem to a news


thanks





Links Manager: Mailing Users Mailing UsersMailing started on Sat Dec 23 23:39:52 2006 CGI ERROR ========================================== Error Message : Unable to init mailer! Reeason: Sendmail was not defined or not found: /usr/lib/sendmail Script Location : nph-email.cgi Perl Version : 5.008005 Form Variables ------------------------------------------- Environment Variables ------------------------------------------- AUTH_TYPE : Basic CONTENT_LENGTH : 3826 CONTENT_TYPE : application/x-www-form-urlencoded DOCUMENT_ROOT : /web/htdocs/www.salentoannunci.com/home/ GATEWAY_INTERFACE : CGI/1.1 HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* HTTP_ACCEPT_ENCODING: gzip, deflate HTTP_ACCEPT_LANGUAGE: it HTTP_CACHE_CONTROL : no-cache HTTP_CONNECTION : Keep-Alive HTTP_COOKIE : PHPSESSID=ceb1d39b145f5ff8dffbfa36acb73bd9 HTTP_HOST : www.salentoannunci.com HTTP_REFERER : http://www.salentoannunci.com/cgi-bin/links/admin/admin.cgi?db=links&html_mail_update=1 HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) PATH : /usr/local/bin:/usr/bin:/bin QUERY_STRING : REMOTE_ADDR : 151.37.217.172 REMOTE_PORT : 15526 REMOTE_USER : tonio REQUEST_METHOD : POST REQUEST_URI : /cgi-bin/links/admin/nph-email.cgi SCRIPT_FILENAME : /web/htdocs/www.salentoannunci.com/home/cgi-bin/links/admin/nph-email.cgi SCRIPT_NAME : /cgi-bin/links/admin/nph-email.cgi SERVER_ADDR : 62.149.140.39 SERVER_ADMIN : postmaster@salentoannunci.com SERVER_NAME : www.salentoannunci.com SERVER_PORT : 80 SERVER_PROTOCOL : HTTP/1.1 SERVER_SIGNATURE : SERVER_SOFTWARE : Apache/2.0
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] problen news letter In reply to
sorry no help my because ?


thanks
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] problen news letter In reply to
Please just check your sendmail path. This one - "/usr/lib/sendmail" seems not correct. Try with something like "/usr/sbin/sendmail"?

Cheers,



Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] problen news letter In reply to
this my file have problem




#!/usr/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: nph-mail.cgi
# Description: Massmails updates.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.01
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

# Required Librariers
# --------------------------------------------------------
BEGIN {
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \
require "links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
require "$db_lib_path/Mailer.pm";
};
if ($@) {
print "HTTP 1.0/200 OK\n";
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n[/url]";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}
}
# ========================================================
eval { &main; }; # Trap any fatal errors so the program hopefully
$@ and &cgierr("Fatal error: $@"); # never produces that nasty 500 server error page.
exit;
sub main {
# --------------------------------------------------------
$|++;
# Print full header.
my $use_html = 0;
$ENV{'REQUEST_METHOD'} and $use_html++;
$nph++;
&html_print_headers() if $use_html;
# Get form contents.
my (%in) = &parse_form() if $use_html;
my $start = time();

# Print a header.
$use_html and
print qq|
<html><head><tittle>Links Manager: Mailing Users</title></head>
<BODY BGCOLOR=#FFFFFF><H2><TT>Mailing Users</TT></H2>
<PRE>|;
print qq|Mailing started on |, scalar localtime($start), "\n";
# Make sure we have everything we need.
my (@data, $mod_msg);
my $message = $in{'message'};
my $subject = $in{'subject'};
my %seen;
$message =~ s/\r//g;

$message or (print "No message defined! Aborting!" and exit);
$subject or (print "No subject defined! Aborting!" and exit);
$db_admin_email or
(print "An admin email has not been set in the config. Aborting!" and exit);
($db_smtp_server or $db_mail_path) or
(print "No SMTP server or Sendmail has been defiend in the config. Aborting!" and exit);
# Let's initilize a mailer.
my $mailer = new Mailer ( { smtp => $db_smtp_server, sendmail => $db_mail_path, from => $db_admin_email, subject => $subject, msg => $message, log => $db_mailer_log } ) or
&cgierr("Unable to init mailer! Reeason: $Mailer::error");
print qq~
Mailing Message:
--------------------------------------------------------
From: $db_admin_email
Subject: $subject
$message
--------------------------------------------------------
~;
# And begin mailing!
my ($email_q, $email_n, $href, $msg_mod);
# We are either mailing from the links database, or from the email
# update (via form input).
#
if ($in{'db'} eq 'email') {
my @address = split /~~/, $in{'mailto'};
my ($unsub, $email_q);
# If from newsletter, we go through the form input, and mail to each user.
foreach $address (@address) {
$email_q = &urlencode ($address);
$unsub = qq~<small>[<a href="$build_email_url?action=unsubscribe&email=$email_q" target="_blank">unsubscribe</a>]</small>~;
# Make sure the address looks ok, and we haven't already mailed to this email address.
($address =~ /.+@.+\..+/[/url]) or (print qq~Invalid email address: $address $unsub. Skipping.\n~ and next);
($seen{$address}++) and (print qq~Already mailed to: $address $unsub!\n~ and next);
# If in debug mode, then just print a message, otherwise actually mail it.
if ($in{'debug'}) {
print qq~Message would have been sent to '$address' $unsub\n~;
}
else {
$msg_mod = &load_template('email', { 'Contact Email' => $address }, $message);
$mailer->send ( { to => $address, msg => $msg_mod } ) ?
(print qq~Message sent succesfully to '$address' $unsub\n~) :
(print qq~Unable to mail to '$address' $unsub. Reason: $Mailer::error\n~);
}
}
}
else {
# Otherwise, open the database and go through and mail requested/all users.
open (DB, "<$db_links_name") or &cgierr("unable to open database: $db_links_name. Reason: $!");
while (<DB>) {
/^#/ and next; # Skip comment Lines.
/^\s*$/ and next; # Skip blank lines.
chomp;
@data = &split_decode($_);
# If this is the one we want to mail..
if ($in{'all'} or ($in{$data[$db_key_pos]} eq 'mail')) {

# We escape the URL and Name so we can provide a link to modify this email address.
$email_q = &urlencode ($data[$db_contact_email]);
$email_n = &urlencode ($db_cols[$db_contact_email]);
$href = qq~$db_script_url?db=links&$email_n=$email_q&view_records=1&ww=1~;
# Make sure the address looks ok and that we haven't emailed to this person before.
($data[$db_mail] eq 'No') and print qq~<a href="$href" target="_blank">$data[$db_key_pos]</a> - Address set to not receive emails. Skipping\n~ and next;
($data[$db_contact_email] =~ /.+@.+\..+/[/url]) or (print qq~<a href="$href" target="_blank">$data[$db_key_pos]</a> - Invalid email address: $data[$db_contact_email]. Skipping.\n~ and next);
($seen{$data[$db_contact_email]}++) and (print qq~<a href="$href" target="_blank">$data[$db_key_pos]</a> - Already mailed to: '$data[$db_contact_email]'!\n~ and next);
# If in debug mode, only print a message.
if ($in{'debug'}) {
print qq~<a href="$href" target="_blank">$data[$db_key_pos]</a> - Message would have been sent to '$data[$db_contact_email]'\n~;
}
else {
# Otherwise let's personalise the message using our template and mail it away!
%link = &array_to_hash (0, @data);
$msg_mod = &load_template('email', \%link, $message);
$mailer->send ( { to => $data[$db_contact_email], msg => $msg_mod } ) ?
(print qq~<a href="$href" target="_blank">$data[$db_key_pos]</a> - Message sent succesfully to '$data[$db_contact_email]'\n~) :
(print qq~<a href="$href" target="_blank">$data[$db_key_pos]</a> - Unable to mail to '$data[$db_contact_email]'. Reason: $Mailer::error\n~);
}
}
}
close DB;
}
# All done, print summary stats.
my $finish = time();
my $elapsed = $finish - $start;
print "--------------------------------------------------------\n";
print "Mailing finished at: ", scalar localtime($finish), ".\nElapsed: $elapsed s.\n";
}
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] problen news letter In reply to
The definition for this variable $db_mail_path is in the admin/links.cfg.

Hope that help



Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] problen news letter In reply to
I have tried but I always have the same problem

thanks
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] problen news letter In reply to
Hi,

You should check with your hosting provider to see exactly the path of sendmail.

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] problen news letter In reply to
I have installed the same script in the same hosting and all it works correctly

this works all corettamnete http://lnx.nauticalink.it/links /

and this has problems problems http://www.salentoannunci.com/links /


thanks
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it