Method code for $builder._ar__mailmsg()

[Turn on line numbering]
arg request, msg;
var u, recip, text, mail, id, fmt, c, cmts;

u = request.submitted_by();
id = request.id();
if (valid(u) && u.is($mail_list)) {
    text = u.mail_name() + " and *bugs";
    .tell("** Specify recipients for this comment, or 'none'");
    recip = (> .prompt("** Mail comment to [" + text + "] ") <);
    if (!recip)
        recip = text;
    if (recip == "no" || recip == "none")
        return "** Not mailing.";
    recip = .parse_mail_recipient_list(recip);
    if (!recip)
        return "** No valid recipients.";
    mail = $mail_message.new_mail();
    mail.set_subject("Comment on AR #" + id + ": " + request.summary());
    text = ["Reported By: " + request.submitted_by()];
    text += ["Reported On: " + $time.format("%d-%h-%Y", request.submitted_on())];
    text += [""];
    text += request.text().mmap('wrap_lines, 70, "> ", 1).flatten();
    cmts = request.comments();
    msg = (cmts.last())[3];
    cmts = sublist(cmts, 1, listlen(cmts) - 1);
    for c in (cmts) {
        fmt = "On " + $time.format("%d-%h-%Y ", c[1]);
        fmt += c[2].namef('ref) + " Comments:";
        text += ["", fmt] + c[3].mmap('wrap_lines, 70, "> ", 1).flatten();
    }
    text += [""] + msg;
    mail.set_text(text);
    catch any
        mail.send(@recip);
    with
        return traceback()[1][2];
    return "** Mail sent.";
}

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark