<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>config/email.yml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,5 @@
+email_conf = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'config', 'email.yml'))
+
 service :email do |data, payload|
   name_with_owner = File.join(payload['repository']['owner']['name'], payload['repository']['name'])
 
@@ -62,7 +64,10 @@ EOH
   message.body    = body
   message.date    = Time.now
 
-  Net::SMTP.start('smtp', 25, 'github.com') do |smtp|
+  smtp_settings  = [ email_conf[:address], (email_conf[:port] || 25), (email_conf[:domain] || 'localhost.localdomain') ]
+  smtp_settings += [ email_conf[:user_name], email_conf[:password], email_conf[:authentication] ] if email_conf[:authentication]
+
+  Net::SMTP.start(*smtp_settings) do |smtp|
     smtp.send_message message.to_s, 'noreply@github.com', data['address']
   end
 end</diff>
      <filename>services/email.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9d724f4acbddc44954a26114130f84a4eafac946</id>
    </parent>
  </parents>
  <author>
    <name>PJ Hyett</name>
    <email>pjhyett@gmail.com</email>
  </author>
  <url>http://github.com/pjhyett/github-services/commit/4b41c93e017e5465aac0cbf90ee5c2f79b688b22</url>
  <id>4b41c93e017e5465aac0cbf90ee5c2f79b688b22</id>
  <committed-date>2009-11-03T16:48:02-08:00</committed-date>
  <authored-date>2009-11-03T16:48:02-08:00</authored-date>
  <message>move email settings to config/email.yml</message>
  <tree>3f634270d4be387ccbb909a194a677cabc19a2af</tree>
  <committer>
    <name>PJ Hyett</name>
    <email>pjhyett@gmail.com</email>
  </committer>
</commit>
