Welcome to Bae-Message

Bae-Message是一个基于百度云消息服务实现的消息通讯模块, 它当前支持通过百度云消息服务发送电子邮件.

本模块已经注册在npm目录中,你可以通过npm直接安装它.

npm install bae-message

使用指南

使用bae-message发送电子邮件非常简单, 你只需加载bae-message模块并提供一些初始化参数就可以开始使用它发送邮件了. 下面是示例代码:

// 加载bae-message模块
var BaeMessage = require('bae-message');
// 初始化bae-message, 需要提示BAE的密钥对以及需要使用的队列编号
// 你可以在: [百度开发者中心](http://developer.baidu.com/bae/ref/key/) 查看和管理你的密钥对
var bae = new BaeMessage({
  key : 'your key', //API KEY
  secret : 'your secret', //API 密钥
  queue: 'queue ID'  //队列编号
});
//通过mail函数发送邮件, 参数分别为 发件人地址, 收件人地址, 主题, 内容
bae.mail('fromAddress', 'to', 'subject', 'mail body');
// 
// 本模块也支持同时发送给多个收件人, 这种情况下, 收件人地址用数组传入
// bae.mail('fromAddress', ['toaddress1', 'toaddress2'], 'subject', 'mail body');

已知问题

  • 无法设置发件人地址

项目计划

  • 支持百度云消息的其他功能

支持和联系方式

可以通过项目Bug管理页面提交你遇到的bug. 如果遇到使用的访问请参考项目的例子或访问项目Wiki 或在讨论板提问

版权

本项目采用MIT授权. The MIT License (MIT)

Copyright (c) 2013 pangwa

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.