From: Sam H. v. a. <we...@ma...> - 2008-02-04 23:07:05
|
Log Message: ----------- added $mail{smtp_timeout} setting Modified Files: -------------- webwork2/lib/WeBWorK/Utils: DelayedMailer.pm webwork2/conf: global.conf.dist Revision Data ------------- Index: DelayedMailer.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Utils/DelayedMailer.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -Llib/WeBWorK/Utils/DelayedMailer.pm -Llib/WeBWorK/Utils/DelayedMailer.pm -u -r1.2 -r1.3 --- lib/WeBWorK/Utils/DelayedMailer.pm +++ lib/WeBWorK/Utils/DelayedMailer.pm @@ -33,6 +33,7 @@ # SMTP settings $$self{smtp_server} = $options{smtp_server}; $$self{smtp_sender} = $options{smtp_sender}; + $$self{smtp_timeout} = $options{smtp_timeout}; # extra headers $$self{headers} = $options{headers}; @@ -88,7 +89,7 @@ return unless @{$$self{msgs}}; - my $smtp = new Net::SMTP($$self{smtp_server}, Timeout=>10) + my $smtp = new Net::SMTP($$self{smtp_server}, Timeout=>$$self{smtp_timeout}) or die "failed to create Net::SMTP object"; my @results; Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.202 retrieving revision 1.203 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.202 -r1.203 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -98,6 +98,9 @@ # a valid mail domain, or at least be well-formed. $mail{smtpSender} = 'we...@yo...'; +# Seconds to wait before timing out when connecting to the SMTP server. +$mail{smtpTimeout} = 30; + # AllowedRecipients defines addresses that the PG system is allowed to send mail # to. this prevents subtle PG exploits. This should be set in course.conf to the # addresses of professors of each course. Sending mail from the PG system (i.e. |