Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #15 from ufl-taeber/master
Browse files Browse the repository at this point in the history
Remove hard-coded smtp.ufl.edu
  • Loading branch information
pbchase committed Aug 6, 2014
2 parents 60dff9e + e90ea61 commit c4d6fc0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2014-08-05 v0.9.1

* HOTFIX to replace smtp.ufl.edu with configurable option in setup.json

2014-08-01 v0.9.0

* Testing: Added Vagrant-based testing VM and documentation for how to use it
Expand Down
7 changes: 6 additions & 1 deletion bin/redi.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
from redcap_transactions import redcap_transactions
import redi_lib


smtp_host_for_outbound_mail = None

# INTERMEDIATE STEPS: XML!
# step 1: parse raw XML to ElementTree: "data"
# step 1b: call read-in function to load xml into ElementTree
Expand Down Expand Up @@ -75,6 +78,8 @@ def main():
# read config
setup_json = proj_root+'config/setup.json'
setup = read_config(setup_json)
global smtp_host_for_outbound_mail
smtp_host_for_outbound_mail = setup['smtp_host_for_outbound_mail']

# load custom post-processing rules
rules = load_rules(setup, proj_root)
Expand Down Expand Up @@ -881,7 +886,7 @@ def send_report(sender,receiver,body):
"""

try:
smtpObj = smtplib.SMTP('smtp.ufl.edu',25)
smtpObj = smtplib.SMTP(smtp_host_for_outbound_mail, 25)
smtpObj.sendmail(sender, receiver, msg.as_string())
print "Successfully sent email to: " + str(receiver)
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='REDI',
version='0.9.0',
version='0.9.1',
author='Christopher P Barnes, Philip Chase, Nicholas Rejack',
author_email='[email protected], [email protected], [email protected]',
packages=find_packages(exclude=['test']),
Expand Down

0 comments on commit c4d6fc0

Please sign in to comment.