## Installation

### 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
/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
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
.

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.
Mail::Sender is deprecated and you should look to Email::Sender instead at (eval 140) line 2.
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 `('

### 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.

### 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.

### 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.

### 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!)

### 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

"

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.

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