BusyB: The sendMail element |
|
|
|
As the name suggests, the sendMail element sends an email message. Typically you would use sendMail in two places:
The example below shows a fairly typical sendMail element: <sendMail>
<to>fred@acme.com</to>
<from>george@acme.com</from>
<subject>The build failed!!!</subject>
<body>You should look into this.</body>
</sendMail>The sendMail element uses SMTP to send out the email and defaults to "localhost" and the standard SMTP port, but you can override these: <sendMail>
<host>mail.acme.com</host>
<port>1233</port>
<to>fred@acme.com</to>
<from>george@acme.com</from>
<subject>The build failed!!!</subject>
<body>You should look into this.</body>
</sendMail>You can also set the default host, port, etc. that the sendmail element will use when you start busyb. Simply use the -e argument: $ busyb.py -eMailHost=myhost.com -eMailPort=250 -eMailFrom=fred@hogwarts.com -eMailSubject=Hello If you are using sendMail to handle an build problem from within <onError>, busyb will set two handy symbols for you:
So a more useful version of the sendMail element above might be: <sendMail>
<host>mail.acme.com</host>
<port>1233</port>
<to>fred@acme.com</to>
<from>george@acme.com</from>
<subject>The build failed: !(ex_details)</subject>
<body>!(ex_details)</body>
</sendMail>
|