What you need is sending mail from the hook script, not from Trac. I
recommend using Python's smtplib module:
http://www.python.org/doc/2.5.2/lib/module-smtplib.html

See usage example here:
http://www.python.org/doc/2.5.2/lib/SMTP-example.html

Just put the mail-sending code (as a function) in a .py file together
with the contributed hook script, and do something like:
   if not cmd_groups:
      send_mail(chgset)

right after the line that says:
   cmd_groups = command_re.findall(self.msg)

Noam.

On Oct 28, 12:31 pm, Jani Tiainen <[EMAIL PROTECTED]> wrote:
> Has someone implemented, or does someone know how to send arbitary
> E-mail from Trac?
>
> I'm about to modify post-commit-hook from contrib to send notification
> if committer didn't provide any reference to ticket. Like there is this
> pre-commit-hook, but in post-commit and just sending e-mail rather than
> failing commit.
>
> Of course, if someone has done it, I would be happy to have such an hook
> script...
>
> --
> Jani Tiainen
>
> "Tein sein mihin näillä lahjoilla pystyin.
>   Tein sen, en yhtään enempää." - Martti Servo & Napander
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to