利用SysMailer发送邮件

static void NJ_MF_SendMail(Args _args)
{
    SysMailer    sysMailer;
    str     emailHeader;
    str     emailToAddress;
    ;

    emailToAddress = "Macro Feng<Macro.Feng@py.nelson-jewellery.com>";
    emailHeader = "This is Testting Mail Do not Reply!";

    sysMailer = new SysMailer();
    sysMailer.tos().appendAddress(emailToAddress);
    sysMailer.subject(emailHeader);
    sysMailer.SMTPRelayServer("192.168.20.56");
    sysMailer.body("Test!!!!!");
    sysMailer.fromAddress("MF<Macro.Feng@py.nelson-jewellery.com>");
    sysMailer.sendMail();

}

posted @ 2012-03-08 13:29  perock  阅读(296)  评论(0编辑  收藏  举报