Our school uses Gmail for our email accounts. I am trying to configure webwork to send email, but I believe that gmail's SMTP servers require a username and password login, and the mail settings in site.conf don't include anywhere to enter such data. Simply setting the smtpServer to smtp.gmail.com produces "Server error: 530 5.7.0 Must issue a STARTTLS command first." when trying to send email from webwork. Is there any way to configure webwork to log into an SMTP server to send mail through?
Old question, but someone could be interested.
I have gmail account switched to less secure access.
smtp server is smt.gmail.com
To send emails I had to add username and password into the /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm file.
In the lines following
sub createEmailSenderTransportSMTP {
I changed the setting into
host => $ce->{mail}->{smtpServer},
ssl => 'starttls', #$ce->{mail}->{tls_allowed}//0, ## turn off ssl security by default
port => $ce->{mail}->{smtpPort},
timeout => $ce->{mail}->{smtpTimeout},
sasl_username => 'myemail@gmail.com',
sasl_password => 'mypassword',
Here of course you have to use your username and password.
According tom some Debian Howto, 100 email per day is the limit for this access to the smtp server. The reply-to is to not the student's email, but the gmail used for sending messages. This has been mentioned in some other threads.
Hope this helps someone.
Robert