I got the following error message:
} else { $Mailer->AddRecipient('' , 'name1@company.com' ) ; error '80004005'
Can't call method "AddRecipient" on unblessed reference.
/feedback.asp, line 35
***********************************************
during the execution of this file: Can you help? Thanks.
Hu
************************************
<%@ LANGUAGE = PerlScript%>
<html>
…..
<%
$MAILHOST = company.com'; ## SMTP server for email page.
$Mailer = $Server->CreateObject("SMTPsvg.Mailer"
$Mailer->{'FromName'} = $Request->Form('Name')->item;
$Mailer->{'FromAddress'} = $Request->Form('Email')->item;
$Mailer->{'RemoteHost'} = $MAILHOST;
$Mailer->{'Subject'} = "Comment from Feedback Page";
$Mailer->{'BodyText'} = "Company / Institution: " . $Request->Form('Company')->item . "\n" .
"Telephone Number: " . $Request->Form('Telephone')->item . "\n" .
"Sender IP Address: " . $Request->ServerVariables('REMOTE_ADDR')->item . "\n\n\n" .
$Request->Form('Comments')->item;
if (! $Request->Form('Name')->item || ! $Request->Form('Email')->item || ! $Request->Form('Comments')->item) {
$Response->write("<BR>Error! You must fill in the Name, Email, and Comments fields. Press the back button on your browser to return to the form.<BR>"
} else {
$Mailer->AddRecipient('' , 'name1@company.com' ) ;
$Mailer->AddRecipient('' , 'name2@company.com' ) ;
$Mailer->AddRecipient('' , 'name3@company.com) ;
if ($Mailer->SendMail()) {
$Response->write("<P><FONT Size=+1>Thank you for your comments. They have been successfully sent.</FONT>"
} else {
$Response->write('<P><FONT Size=+1>An Error has occurred. Your comments have not been successfully sent.<BR>
<a href="mailto: name2@company.com">Try clicking here to invoke your local mail program
to E-mail name2@company.com</a></FONT>' );
}
}
%>
….
</body>
</html>
[sig][/sig]
} else { $Mailer->AddRecipient('' , 'name1@company.com' ) ; error '80004005'
Can't call method "AddRecipient" on unblessed reference.
/feedback.asp, line 35
***********************************************
during the execution of this file: Can you help? Thanks.
Hu
************************************
<%@ LANGUAGE = PerlScript%>
<html>
…..
<%
$MAILHOST = company.com'; ## SMTP server for email page.
$Mailer = $Server->CreateObject("SMTPsvg.Mailer"
$Mailer->{'FromName'} = $Request->Form('Name')->item;
$Mailer->{'FromAddress'} = $Request->Form('Email')->item;
$Mailer->{'RemoteHost'} = $MAILHOST;
$Mailer->{'Subject'} = "Comment from Feedback Page";
$Mailer->{'BodyText'} = "Company / Institution: " . $Request->Form('Company')->item . "\n" .
"Telephone Number: " . $Request->Form('Telephone')->item . "\n" .
"Sender IP Address: " . $Request->ServerVariables('REMOTE_ADDR')->item . "\n\n\n" .
$Request->Form('Comments')->item;
if (! $Request->Form('Name')->item || ! $Request->Form('Email')->item || ! $Request->Form('Comments')->item) {
$Response->write("<BR>Error! You must fill in the Name, Email, and Comments fields. Press the back button on your browser to return to the form.<BR>"
} else {
$Mailer->AddRecipient('' , 'name1@company.com' ) ;
$Mailer->AddRecipient('' , 'name2@company.com' ) ;
$Mailer->AddRecipient('' , 'name3@company.com) ;
if ($Mailer->SendMail()) {
$Response->write("<P><FONT Size=+1>Thank you for your comments. They have been successfully sent.</FONT>"
} else {
$Response->write('<P><FONT Size=+1>An Error has occurred. Your comments have not been successfully sent.<BR>
<a href="mailto: name2@company.com">Try clicking here to invoke your local mail program
to E-mail name2@company.com</a></FONT>' );
}
}
%>
….
</body>
</html>
[sig][/sig]