Installation

Need help with Mail::Sender

Need help with Mail::Sender

by Jim Fischer -
Number of replies: 6
There seems to be some problems with installing Mail::Sender. I am using the instructions for installing 2.12 with ubuntu 16.04:

http://webwork.maa.org/wiki/Installation_Manual_for_2.12_on_Ubuntu_16.04#.WG-bflzD42g

When I run check_modules.pl apache2 I get the output shown at bottom of this post.

I tried to follow these instructions:
sudo perl -MCPAN -e shell [sudo] password for wwadmin: <wwadmin password> 

and accept any defaults. Then

cpan> install Mail::Sender 

and accept any defaults. Now

 cpan> exit
However, the first question said something about defaults and I answered yes, when I think I should have answered No. Unfortunately, once this process has been screwed up it doesnt seem to be reversible. I have tried to reinstall and I have tried to uninstall Mail::Sender to start over. Neither methods have fixed my problems.

I really dont want to start over entirely and could use some help in figuring out what to do to fix this efficiently.

Here is the output from check_modules.pl apache2:



Checking your $PATH for executables required by WeBWorK...
$PATH= /home/wwadmin/bin
/home/wwadmin/.local/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin
/opt/webwork/webwork2/bin

curl found at /usr/bin/curl
mkdir found at /bin/mkdir
mv found at /bin/mv
mysql found at /usr/bin/mysql
tar found at /bin/tar
git found at /usr/bin/git
gzip found at /bin/gzip
latex found at /usr/bin/latex
pdflatex found at /usr/bin/pdflatex
dvipng found at /usr/bin/dvipng
giftopnm found at /usr/bin/giftopnm
ppmtopgm found at /usr/bin/ppmtopgm
pnmtops found at /usr/bin/pnmtops
pnmtopng found at /usr/bin/pnmtopng
pngtopnm found at /usr/bin/pngtopnm

Checking your @INC for modules required by WeBWorK...
@INC= /etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.22.1
/usr/local/share/perl/5.22.1
/usr/lib/x86_64-linux-gnu/perl5/5.22
/usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl/5.22
/usr/share/perl/5.22
/usr/local/lib/site_perl
/usr/lib/x86_64-linux-gnu/perl-base
.

Array::Utils found and loaded
Benchmark found and loaded
Carp found and loaded
CGI found and loaded
Class::Accessor found and loaded
Crypt::SSLeay found and loaded
Dancer found and loaded
Dancer::Plugin::Database found and loaded
Data::Dumper found and loaded
Data::UUID found and loaded
Date::Format found and loaded
Date::Parse found and loaded
DateTime found and loaded
DBD::mysql found and loaded
DBI found and loaded
Digest::MD5 found and loaded
Digest::SHA found and loaded
Email::Address found and loaded
Errno found and loaded
Exception::Class found and loaded
File::Copy found and loaded
File::Find found and loaded
File::Find::Rule found and loaded
File::Path found and loaded
File::Spec found and loaded
File::stat found and loaded
File::Temp found and loaded
GD found and loaded
Getopt::Long found and loaded
Getopt::Std found and loaded
HTML::Entities found and loaded
HTML::Scrubber found and loaded
HTML::Tagset found and loaded
HTML::Template found and loaded
IO::File found and loaded
Iterator found and loaded
Iterator::Util found and loaded
Prototype mismatch: sub main::from_json: none vs ($@) at (eval 110) line 2.
Prototype mismatch: sub main::to_json: none vs ($@) at (eval 110) line 2.
JSON found and loaded
Locale::Maketext::Lexicon found and loaded
Locale::Maketext::Simple found and loaded
LWP::Protocol::https found and loaded
Mail::Sender is deprecated and you should look to Email::Sender instead at (eval 140) line 2.
Mail::Sender found and loaded
MIME::Base64 found and loaded
Net::IP found and loaded
Net::LDAPS found and loaded
Net::OAuth found and loaded
Net::SMTP found and loaded
Opcode found and loaded
PadWalker found and loaded
Path::Class found and loaded
PHP::Serialization found and loaded
Pod::Usage found and loaded
Pod::WSDL found and loaded
Safe found and loaded
Scalar::Util found and loaded
SOAP::Lite found and loaded
Socket found and loaded
SQL::Abstract found and loaded
String::ShellQuote found and loaded
Template found and loaded
Text::CSV found and loaded
Text::Wrap found and loaded
Tie::IxHash found and loaded
Time::HiRes found and loaded
Time::Zone found and loaded
URI::Escape found and loaded
UUID::Tiny found and loaded
XML::Parser found and loaded
XML::Parser::EasyTree found and loaded
XML::Writer found and loaded
XMLRPC::Lite found and loaded
YAML found and loaded
Apache2::Request found and loaded
Apache2::Cookie found and loaded
Apache2::ServerRec found and loaded
Apache2::ServerUtil found and loaded
wwadmin@mathdev:/usr/local/share/perl/5.22.1/Mail$ Mail::Sender is deprecated and you should look to Email::Sender instead at (eval 140) line 2.
-bash: syntax error near unexpected token `('



In reply to Jim Fischer

Re: Need help with Mail::Sender

by Jim Fischer -
Update...

Ive looked this over and it appears that the latest version of Mail::Sender is getting loaded. I'm not sure why there is the following line in the output shown above:

Mail::Sender is deprecated and you should look to Email::Sender instead at (eval 140) line 2.

However, Im starting to think that the webwork system and the modules are all good and that the email issue could be a problem on the mail server side that I am trying to use. I have asked my school's IT department to see if there is something on their end that is keeping WebWork from connecting to the school email server.




In reply to Jim Fischer

Re: Need help with Mail::Sender

by Jim Fischer -
I put in a request for our IT department to see if there is something on their side, such as blocked port or ?

In the meantime, I will post what is happening in case someone here can figure out why the email is not working.

1. From Faculty to Student(s) no WW error is presented, the system says email is sent. However, no email is received.

2. From Student to Faculty, using email instructor button. WW times out and gives the following error:

Failed to open the mailer: connect() failed: Input/output error



Mail::Sender appears to be loading and I am using the same settings in site.conf as are being used in another server that is running WW with no email issues.


In reply to Jim Fischer

Re: Need help with Mail::Sender

by Michael Gage -
It seems to me that IT might be able to look at logs at the smtp to see if the mailer connection request has been received. 
In reply to Michael Gage

Re: Need help with Mail::Sender

by Jim Fischer -
Thanks Mike.

Okay, I made more progress. Our school is using Authentication with their smtp email server. They think the reason why the production server running WW is sending email while the development server is not is because they had setup an exception for the authentication on the production server.

Their desire is to have WebWork work with the authentication in place when communicating with the school smtp server.

I have been asked if WebWork can do this and if so is there anything I need to do differently say when entering things into site.conf.

Thanks in case you can help me clear this up. Keep in mind I really don't know much about this stuff (in case that isnt obvious already!)


In reply to Jim Fischer

Re: Need help with Mail::Sender

by Michael Gage -
Hi Jim,

Here is a reply to my question to our local IT guy, Hoss Firooznia, about 
what kind of authorization they were talking about. 

"They're most likely using the auth mechanism that's part of the SMTP protocol. Here's how to use it in Perl:


http://search.cpan.org/~jenda/Mail-Sender/Sender.pm#Using_MailMsg_and_authentication

"


Run that by your IT people and see if they recognize the userName/passWord combination needed.


You can run grep on the webwork code and see where the smtp request is formulated -- probably in SendMail.pm.


The other thing they might be talking about would be TLS (transport layer security) which some 

smtp servers use.  We have this turned of by default in site.conf because many smtp servers become

confused if WeBWorK sends them tls prompts, but that might not be the case in your situation.


https://luxsci.com/blog/smtp-tls-all-about-secure-email-delivery-over-tls.html


I don't have time to trouble shoot this myself right now, the semester is starting, but let me know how far you and your IT people get and I'll try to help out in two weeks or so if the situation is not resolved.


Take care,

Mike




In reply to Michael Gage

Re: Need help with Mail::Sender

by Jim Fischer -
Mike and others,

A big thank you for your time and efforts trying to help with this and other issues. I am happy to say that this issue has been resolved! Our IT department found a firewall issue that was blocking the email.

Whew! And just in time. This WW install is on our backup server. Just today we had a full server crash on our main production server. I am hoping to get that fixed, but in the mean time our faculty can recreate their courses on our backup server and use it until production server/WW issues are resolved.

Thanks again, this forum has really been helpful.

Jim