<div dir="ltr">Hi Pierre,<div><br></div><div>Thanks for the reply. I later on found out that I can skip the subject field from MailNotifier and send it as a key-value pair of messageFormatter field dictionary,</div><div><br></div><div>I replaced below code:</div><div><div><br></div><div>c["status"].append(MailNotifier(</div><div> builders=["CRT_Promoter_2"],</div><div> fromaddr="nilay@localhost",</div><div> sendToInterestedUsers=False,</div><div> mode="passing",</div><div> extraRecipients=email_recipients,</div><div><b><span style="white-space:pre"> </span>subject="CRT Promotion notification"</b></div><div> messageFormatter=crt_promoter_message_formatter))</div></div><div><br></div><div>def def crt_promoter_message_formatter(mode, name, build, results, master_status):</div><div> text = list()</div><div> ... </div><div> # update list with email body</div><div> ....</div><div><div> return {'body': u"\n".join(text),</div><div> 'type': 'html'}</div></div><div><br></div><div>with ...</div><div><br></div><div><div><div>c["status"].append(MailNotifier(</div><div> builders=["CRT_Promoter_2"],</div><div> fromaddr="nilay@localhost",</div><div> sendToInterestedUsers=False,</div><div> mode="passing",</div><div> extraRecipients=email_recipients,</div><div><span style="white-space:pre"> <b>#</b></span><b>subject="CRT Promotion notification"</b></div><div> messageFormatter=crt_promoter_message_formatter))</div></div><div><br></div><div>def def crt_promoter_message_formatter(mode, name, build, results, master_status):</div><div> text = list()</div><div> ... </div><div> # update list with email body</div><div> ....</div><div><div> return <b>{'subject':"CRT Promotion notification, CRT Tag:{}".format(build.getProperty('tag','')),</b></div><div> 'body': u"\n".join(text),</div><div> 'type': 'html'}</div></div></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 14, 2016 at 1:29 AM, Pierre Tardy <span dir="ltr"><<a href="mailto:tardyp@gmail.com" target="_blank">tardyp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nilay,<div><br></div><div>I am not sure exactly what is your request.</div><div><br></div><div>Usually, when you need customization that is not possible by just configuring the buildbot object, you might want to just subclass that object.</div><div>In this case, you would mailnotifier do not have much option to customize the subject of the email, so you would have to subclass it.</div><div><br></div><div>Please note that such subclassing might not be portable with subsequent buildbot releases.</div><div>Notably buildbot nine mailnotifier has changed a lot, so you will need to rewrite your subclassing code when you upgrade</div><div><br></div><div>Regards</div><div>Pierre</div><div><br></div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">Le mar. 14 juin 2016 à 03:20, Nilay Chheda <<a href="mailto:mit2nil@gmail.com" target="_blank">mit2nil@gmail.com</a>> a écrit :<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi, <br clear="all"><div><br></div><div>I am new to buildbot community. I am working on some existing buildbot code for one project. Code mainly contains few builders/schedulers/status notifier etc. in BuilderConfig dict. </div><div><br></div><div>I want to send custom mail notification with certain build properties in the mail subject itself. In mail body I have build object instance coming as a parameter. How can I get custom build object in my master.cfg file itself?</div><div><br></div><div>I went through several files on buildbot github and tried to search in buildbot documentation but not able to figure out way to do it. </div><div><br></div><div>I am using buildbot 0.8.12. Thanks for your help. </div><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div><font color="#000000" face="verdana, sans-serif">Regards,</font></div><div><font face="verdana, sans-serif"><strong><font color="#000000">Nilay Chheda</font></strong><br><br></font></div></div></div></div>
</div></div></div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a></blockquote></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font color="#000000" face="verdana, sans-serif">Regards,</font></div><div><font face="verdana, sans-serif"><strong><font color="#000000">Nilay Chheda</font></strong><br><a href="http://nilay.branded.me" target="_blank"><font color="#000000">nilay.branded.me</font></a></font></div></div></div></div></div>
</div>