Function sendCustomEmail

  • Send a custom email with specified sender and email server

    Parameters

    • userName: string

      email user name

    • password: string

      user password(请勿在代码中使用明文密码,推荐通过系统参数加密配置)

    • sender: string

      email sender

    • template: string

      email template name

    • input: Dict

      the request input parameters.

    • Optional smtpHost: string

      email SMTP server ip:port (optional)

    Returns Dict

    Example


    import * as sys from 'sys';
    function testSend() {
    let map = {
    "body":"email content",
    "subject": "email subject",
    "address": "email address",
    "cc": "", //optional
    "bcc": "" //optional
    }
    let password = sys.getParameter('your_sysparam_of_password');
    sys.sendCustomEmail('user', password, '', '', map) // send without template
    }