<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Леутин Александр <<a href="mailto:a.leutin@infinnity.ru">a.leutin@infinnity.ru</a>> schrieb am Do., 10. Aug. 2017 um 15:24 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div>Hello!</div><div> </div><div>I'm trying to set up notifications to certain users about changing certain files in repository within Kallithea.</div><div>I set up hook with type of "incoming" to launch python function.</div><div> </div><div>I already digged how to use two extra fields I created for this task (monitor_files and monitor_emails), and now I have difficulties with sending e-mail notifications.</div><div> </div><div>In the kallithea/model/comment.py I saw this code:</div><div> </div><div>            NotificationModel().create(</div><div>                created_by=user, subject=subj, body=body,</div><div>                recipients=recipients, type_=notification_type,</div><div>                email_kwargs=email_kwargs,</div><div>            )</div><div> </div><div>Will it be sufficient to create such model in my hook code to send e-mail notifications, or I have to do something else?</div></div></div></blockquote><div>Kallithea has no API for sending emails. </div><div>I'd recommend creating a hook that uses something like <a href="https://docs.python.org/2/library/email-examples.html">https://docs.python.org/2/library/email-examples.html</a></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div> </div><div>--</div><div>Alexandr Leutin</div></div></div>_______________________________________________<br>
kallithea-general mailing list<br>
<a href="mailto:kallithea-general@sfconservancy.org" target="_blank">kallithea-general@sfconservancy.org</a><br>
<a href="https://lists.sfconservancy.org/mailman/listinfo/kallithea-general" rel="noreferrer" target="_blank">https://lists.sfconservancy.org/mailman/listinfo/kallithea-general</a><br>
</blockquote></div></div>