Skip to content

能给一个发邮件的例子吗? #33

@laotie1015

Description

@laotie1015

var account = new AliMNS.Account(accountId,accessKeyId, accessKeySecret);

        var emailBody = JSON.stringify({
          Action: "SingleSendMail",
          AccountName: "a*****y.com",
          ReplyToAddress: false,
          AddressType: 0,
          ToAddress: "l*****5@163.com",
          FromAlias: "****",
          Subject: "ceshi",
          TextBody: "ceshiyoujian",
          IsHtml: 0,
          ReplyToAddress: 0
        });
        var topic = new AliMNS.Topic("email-topic-cn-hangzhou", account, "hangzhou-internal");
        //topic.listP().then(console.log);
        //console.log(emailBody);
        var body = { DirectMail: emailBody};
        //console.log(XmlBuilder.create(body).toString());
        topic.publishP("test email", false, null, body)
              .then(console.log, console.error);

为啥还是报错: Message: 'The XML you provided did not validate against our published schema, cause by "DirectMail" Element.',

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions