English 中文(简体)
SVN 通过GMAILSMTP发出的通知
原标题:SVN Notifications via GMAIL SMTP

我在乌班图11.0432比特开了特别志愿人员,现在要用我的全球监测与核查与核查报告账户通知每一项承诺。

我投下了几件事,但实际上并没有收回他们用的电子邮件。 没有出现任何错误,我通过这些错误来研究,但迄今没有发现非常有用的信息。

我读到有关这一职位的相当位置,并编辑以下文件,包括其中现在的内容。 我先尝试使用发送邮件和固定邮局,但没有随信,因此,我正在使用谷歌邮件服务器。 如果有人能向我指出正确的方向或替代办法,将不胜感激。

我发现并使用了这些链接。

http://iffee.wordpress.com/2009/04/08/svn-commit-to-google-apps-email-notification/

post-commit.tmpl

REPOS="$1"
REV="$2"

/home/megaz/svn/repos/ya/hooks/mailer.py commit "$REPOS" 
"$REV" /home/megaz/svn/repos/ya/hooks/mailer.conf

www.un.org/Depts/DGACM/index_french.htm

[general]
smtp_hostname = smtp.gmail.com:587
smtp_username = #mygmailaddress
smtp_password = #mygmailpassword
smtp_use_ssl = true
smtp_use_tls = 1

[defaults]
diff = /usr/bin/diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s
commit_subject_prefix = [SVN-Commit]
propchange_subject_prefix =
lock_subject_prefix =
unlock_subject_prefix =
from_addr = #my from address 
to_addr = #my to address 
reply_to = #my replyto address 
generate_diffs = none
show_nonmatching_paths = yes

[maps]

mailer.py

class SMTPOutput(MailedOutput):
   def start(self, group, params):
     MailedOutput.start(self, group, params)
     self.buffer = StringIO()
     self.write = self.buffer.write
     self.write(self.mail_headers(group, params))
   def finish(self):
     server = smtplib.SMTP(self.cfg.general.smtp_hostname)
     # 2009-12-13 asadomov: add ssl configuration (e.g. for gmail smtp server)
     if self.cfg.is_set( general.smtp_use_ssl ) and self.cfg.general.smtp_use_ssl.lower() == "true":
       server.ehlo()
       server.starttls()
       server.ehlo()
     if self.cfg.is_set( general.smtp_username ):
       server.login(self.cfg.general.smtp_username,
                    self.cfg.general.smtp_password)
     server.sendmail(self.from_addr, self.to_addrs, self.buffer.getvalue())
     server.quit()
问题回答

我看到,你没有读到指示。 你们的法典有复印件/寄售需要,在你下载的较大档案中替换一台刀。 此外,邮递后专册的档案名称不应有<条码>。

也许这解释了你为什么要找回信去工作的原因。 此时,我建议照此而复述。

  1. rename your "post-commit.templ" to "post-commit"
  2. make sure you give exec rights (such as 755) to "post-commit"




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签