<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sendTemplate(mailer, sender, recipient, template, context, hook=_nop):
 """ Simple case for sending some e-mail using a template. """

    headers, parts = template.evaluate(context)
    headers["From"] = sender
    headers["To"] = recipient
    hook(headers, parts)

    content = mime.buildMessage(headers, parts)
    return mailer.send(sender, recipient, content)