email-notificationsgitblit

GitBlit email notification on push and commit


I want to send email latter with commit diff, when each commit will pushed. I found some info here http://gitblit.com/setup_hooks.html, but i dont understand where should i put my Post-Receive, and what structure it will have. Can somebody help me with usefull links, or some info


Solution

  • Open file gitblit/data/gitblit.properties and add the following lines:

    mail.server   = <SMTP server>
    mail.port     = <SMTP port>
    mail.username = <SMTP username>
    mail.password = <SMTP password>
    
    # Uncomment one line of these two depending on your SMTP server
    # mail.smtps    = true
    # mail.starttls = true
    
    mail.fromAddress    = <SMTP from address, e.g. noreply@example.com>
    mail.adminAddresses = <Admin email address (optional)>
    
    groovy.postReceiveScripts = sendmail.groovy
    

    That's it. If you set mail.adminAddresses Gitblit will send an email to that address on every push.


    It is also possible to set the mailing list for a specific repository (open your repo → edit → miscellaneous → mailing lists):