Skip to content

Kreata/firemail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Send E-mails from FirefoxOS

firemail allows you to send e-mails from a FirefoxOS app with ease

See example app for a complete example of sending a formatted mail with firemail from FirefoxOS.

Dependencies for firemail:

tl;dr - send an email using firemail

Volo

Install with volo:

volo add Kreata/firemail/v0.1.1

AMD

Require firemail.js as firemail

Ensure privileges

Opening TCP sockets to a SMTP server requires special privileges. You need to set the type of your application to "privileged" and add "tcp-socket" to the permissions list in the application manifest.

{
    "type" : "privileged",
    "permissions": {
        "tcp-socket": {
            "description" : "SMTP access"
        }
    },
    ...
}

Send some mail

firemail({
    stmp:{
        host: "smtp.gmail.com",
        useSSL: true,
        auth: {
            user: "yourgmail@user",
            pass: "password"
        }
    },
    from: "sender@example.com",
    to: "receiver@example.com",
    subject: "test message",
    text: "Hello world!",
    html: "<b>Hello world!</b>"
}, function(err, success){
    alert(err || success);
});

Documentation

Tests

Unit tests for firemail reside in the example app.

License

MIT

About

E-mail components for FirefoxOS and nothing more.

Resources

License

Stars

Watchers

Forks

Packages

No packages published