Git Product home page Git Product logo

cordova-plugin-smtp-client's Introduction

Cordova SMTP Client

Basic SMTP client cordova plugin for editing and sending email messages.

Installation

Install iOS and/or Android platform

cordova platform add ios
cordova platform add android

Install the plugin using any plugman compatible cli

$ cordova plugin add https://github.com/CWBudde/cordova-plugin-smtp-client.git

Usage

On Javascript, use code that is similar to the following.

var mailSettings = {
    emailFrom: "[email protected]",
    emailTo: "[email protected]",
    smtp: "smtp-mail.domain.com",
    smtpUserName: "[email protected]",
    smtpPassword: "password",
    attachments: ["attachment1", "attachment2"],
    subject: "email subject",
    textBody: "write something within the body of the email"
};
            
var success = function(message) {
	alert(message);
}

var failure = function(message) {
	alert("Error sending the email");
}			
			
smtpClient.sendMail(mailSettings, success, failure);

Attachments

The attachments is an array of strings.

On the iOS platform, it must use a DATA_URI format.

On the Android platform, it must be the path to the file.

Return type

The return object "message" has the following structure

{
	success: boolean,
	errorCode: number,
	errorMessage: string	    
}

Copyright

The library was originally written by albernazf (cordova-smtp-client) and later modified by Nelson Medina Humberto (cordova-smtp-client).

On iOS it makes use of the skpsmtpmessage library, which was originally written by Ian Baird. A recent fork can be found on (skpsmtpmessage).

cordova-plugin-smtp-client's People

Contributors

aqibmapari avatar cwbudde avatar darrensapalo avatar gero3 avatar itsonit avatar justin-msg avatar thi3rry avatar zemrys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.