Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

SMTP Error: transmission of message failed

Quote Reply
SMTP Error: transmission of message failed
I have not come across this error after using LINKS SQL v.1.X for the past ten months:

In Reply To:

SMTP: Transmission of message failed. at /path/to/www/bin/admin/AG/HTML_Templates.pm line 2482.


This is line 2482 in HTML_Templates.pm:

In Reply To:

$mailer->send or die $AG::Mailer::error;


The complete SEND EMAIL ERROR sub in the HTML_Templates file looks like the following:

Code:

sub send_error {
#------------------------------------------------------
# Sends email message to Administrator

# Check to make sure that there is an admin email address defined.
$AG{db_admin_email} or die ("Admin Email Address Not Defined in config file!");
my ($in) = @_;
my ($to, $from, $subject, $msg, $mailer);
my %in = %{$in};
my $remote_address = $ENV{'REMOTE_ADDR'};
my $check_host = scalar(gethostbyaddr(inet_aton($remote_address), AF_INET));
my $shortdom = scalar(gethostbyaddr(inet_aton($remote_address), AF_INET));
$shortdom = $1 if ($shortdom =~ /.*\.([^.]*\.[^.]*)/);
my $check_sd = qq|$shortdom|;
$to = $AG{db_admin_email};
$from = $AG{db_support_email};
$subject = "Alert! Error Encountered!\n";
$msg = qq|Alert! The following error has occurred:

==================================================
Error: $in{'error'}
Script Name: $ENV{'SCRIPT_NAME'}
==================================================

ENVIRONMENTAL VARIABLES
==================================================
Referring Page: $ENV{'HTTP_REFERER'}
Domain: $check_sd
Remote Host: $check_host
Remote Address: $remote_address
==================================================

Sincerely,
Automated AG Alert Manager
|;

# Then mail it away!
require AG::Mailer;
$mailer = new AG::Mailer ( {
smtp => $AG{db_smtp_server},
sendmail => $AG{db_mail_path},
from => $from,
subject => $subject,
to => $to,
msg => $msg
} ) or die $AG::Mailer::error;
$mailer->send or die $AG::Mailer::error;
}


The subroutine call in the CGI script looks like the following:

In Reply To:

&AG::HTML_Templates::send_error ({error => "Unknown Review ID: $id"}, $in);


To see an example of this ERROR, go to:

http://anthro-globe.com/...etail.cgi?ID=1939349

Keep in mind that I have re-named Links folder to AG.

The exact same codes work just fine on two other UNIX servers. The server where this problem is occurring is a Linux:RedHat, using SMTP rather than SENDMAIL.

Thanks in advance for any direction or suggestions you can give...thanks!

Regards,

Eliot Lee
Quote Reply
Re: SMTP Error: transmission of message failed In reply to
Edit Mailer.pm and change:

TRANSFAILED => "SMTP: Transmission of message failed.",

to:

TRANSFAILED => "SMTP: Transmission of message failed '$e1'.",

and:

$_ = <$s>; if (/^[45]/) { close $s; &error('TRANSFAILED'); return undef; }

to:

$_ = <$s>; if (/^[45]/) { close $s; &error('TRANSFAILED', $_); return undef; }

That way you should get a more meaningful error message.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: SMTP Error: transmission of message failed In reply to
Thanks, Alex...

Now, I get the following error message:

In Reply To:

SMTP: Transmission of message failed. '451 See http://pobox.com/~djb/docs/smtplf.html. ' at /data/web/64216/www/bin/admin/AG/HTML_Templates.pm line 2475.


I went to that web page...

I don't understand why there would be a linefeed problem with the same MAILER sub that is used throughout the site, including a Feedback form where the same TO email address is used.

This is very confusing...

Regards,

Eliot Lee
Quote Reply
Re: SMTP Error: transmission of message failed In reply to
*bump*

Regards,

Eliot Lee