WeBWorK Problems

Email problem with Questionaire

Re: Email problem with Questionaire

by Michael Gage -
Number of replies: 0
Hi Curtis,

I checked with Sam Hathaway about this. His comments:

This is most likely due to the server being unreachable. The code in
question is in webwork2/lib/WeBWorK/Utils/DelayedMailer.pm line 91-92:

my $smtp = new Net::SMTP($$self{smtp_server}, Timeout=>10)
or die "failed to create Net::SMTP object";

Net::SMTP doesn't set any status codes, but we could get a better error
on STDERR (goes to the apache error log) from the Debug=>1 flag. Change
the above lines to:

my $smtp = new Net::SMTP($$self{smtp_server}, Timeout=>10, Debug=>1)

or die "failed to create Net::SMTP object";

You might also try increasing the timeout to 20 or more from 10 in case the mail server is slow rather than overloaded. At the very least this should give you a more complete information about the difficulty. You will probably need to discuss the problem with whoever is maintaining the mail server that WeBWorK is using. (If you have more than one mail server available, then switching the mail server might provide a short term fix. The mail server is specified in webwork2/conf/global.conf.)

Hope this helps.

-- Mike