forked from openwebwork/webwork2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openwebwork#2451 from dlglin/SMTP-Auth
Add username and password option for SMTP authentication
- Loading branch information
Showing
10 changed files
with
96 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,26 +242,16 @@ $webwork_courses_dir = "/opt/webwork/courses"; # a typical place to put course d | |
# The following directives need to be configured in order for your webwork | ||
# server to be able to send mail. | ||
|
||
# Mail sent by the PG system and the mail merge and feedback modules will be | ||
# sent via this SMTP server. localhost may work if your server is capable | ||
# of sending email, otherwise type the name of your School's outgoing email | ||
# server. | ||
# Mail sent by the mail merge and feedback modules will be sent via this SMTP | ||
# server. localhost may work if your server is capable of sending email, | ||
# otherwise type the name of your School's outgoing email server. | ||
$mail{smtpServer} = ''; # e.g. 'mail.yourschool.edu' or 'localhost' | ||
|
||
# When connecting to the above server, WeBWorK will send this address in the | ||
# MAIL FROM command. This has nothing to do with the "From" address on the mail | ||
# message. It can really be anything, but some mail servers require it contain | ||
# a valid mail domain, or at least be well-formed. | ||
$mail{smtpSender} = ''; # e.g. '[email protected]' | ||
# Be sure to use single quotes for the address or the @ sign will be interpreted as an array. | ||
|
||
$mail{set_return_path} = ''; #sets the return_path to the From: field (sender's email address) | ||
# The return path is used to send error messages about bounced emails | ||
# "noreply\@$mail{smtpServer}" discards error messages, | ||
# using $mail{smtpSender} would deliver error messages to that address. | ||
# The default setting should be adjusted for local domain | ||
# Leaving the return path blank triggers the default which results in Return-Path being set to the email of the sender. | ||
# | ||
|
||
# Seconds to wait before timing out when connecting to the SMTP server. | ||
# the default is 120 seconds. | ||
|
@@ -270,32 +260,47 @@ $mail{set_return_path} = ''; #sets the return_path to the From: field (sender's | |
|
||
$mail{smtpTimeout} = 30; | ||
|
||
|
||
# TLS is a method for providing secure connections to the smtp server. | ||
# https://en.wikipedia.org/wiki/Transport_Layer_Security | ||
# At some sites coordinating the certificates properly is tricky | ||
# Set this value to 0 to avoid checking certificates. | ||
# Set it to 0 to trouble shoot an inability to verify certificates with the smtp server | ||
# Allowed values: 'starttls', 'ssl', 'maybestarttls', 0 | ||
# Values of 'maybestarttls' and 0 are insecure and are not recommended for | ||
# production environments, except where the smtp server is localhost. | ||
|
||
$mail{tls_allowed} = 0; | ||
|
||
#$tls_allowed=0; #old method -- this variable no longer works. | ||
# Extra settings for SSL/TLS | ||
# You may need to use this setting if your SMTP server uses a self-signed certificate. | ||
# SSL_verify_mode => 0 is not recommended for production environments for security | ||
# reasons. See https://metacpan.org/pod/IO::Socket::SSL#Common-Usage-Errors | ||
|
||
#$mail{smtpSSLOptions} = {SSL_verify_mode => 0}; | ||
|
||
# errors of the form | ||
# unable to establish SMTP connection to smtp-gw.rochester.edu port 465 | ||
# indicate that there is a mismatch between the port number and the use of ssl | ||
# use port 25 when ssl is off and use port 465 when ssl is on (tls_allowed=1) | ||
# "unable to establish SMTP connection to smtp-gw.rochester.edu port 465" | ||
# indicate that there may be a mismatch between the port number and the use of ssl. | ||
# Many mail servers use port 25 when ssl is off, use port 465 when ssl is on (tls_allowed='ssl'), | ||
# and use port 587 when starttls is used (tls_allowed='starttls'). | ||
|
||
|
||
# Set the SMTP port manually. Typically this does not need to be done it will use | ||
# port 25 if no SSL is on and 465 if ssl is on | ||
# Set the SMTP port manually. Typically this does not need to be done. It will use | ||
# port 25 if insecure, and 465 if ssl is on | ||
|
||
#$mail{smtpPort} = 25; | ||
|
||
# Debugging tutorial for sending email using ssl/tls | ||
# https://maulwuff.de/research/ssl-debugging.html | ||
|
||
# SMTP Authentication | ||
# If your SMTP server requires authentication you can provide the username and password | ||
# for the account on the mail server. | ||
# If you set these credentials, you may need to define the variables $feedback_sender_email, | ||
# $instructor_sender_email and $jitar_sender_email in localOverrides.conf, as some SMTP | ||
# servers require the "From:" address of outgoing emails to match this username. Setting | ||
# those sender variables will then put the user's email address in the "Reply-to:" field. | ||
|
||
#$mail{smtpUsername} = ''; | ||
#$mail{smtpPassword} = ''; | ||
|
||
# Set maxAttachmentSize to the maximum number of megabytes to allow for the size of | ||
# files attached to feedback emails. Note that this should be set to match the | ||
# limitations of the email server chosen above, and should be set to a value greater | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
## template for a Welcome message to be emailed to class (delete this line) | ||
## Note that the From: address will be replaced by the email address of the account | ||
## from which the message is sent. | ||
From: [email protected] (Jan Teacher) | ||
Reply-To: [email protected] | ||
Subject: online homework for Math 123 | ||
Message: | ||
Hi $FN, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters