Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cwbudde/cordova-plugin-smtp-client
Basic SMTP client for editing and sending email messages
https://github.com/cwbudde/cordova-plugin-smtp-client
android cordova ios smtp smtp-client
Last synced: 2 months ago
JSON representation
Basic SMTP client for editing and sending email messages
- Host: GitHub
- URL: https://github.com/cwbudde/cordova-plugin-smtp-client
- Owner: CWBudde
- Created: 2017-10-04T18:03:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-11-16T22:32:58.000Z (about 3 years ago)
- Last Synced: 2024-11-09T07:22:52.803Z (2 months ago)
- Topics: android, cordova, ios, smtp, smtp-client
- Language: Objective-C
- Size: 533 KB
- Stars: 5
- Watchers: 3
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 androidInstall 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](doc/attachments.md).
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](https://github.com/albernazf/cordova-smtp-client)) and later modified by Nelson Medina Humberto ([cordova-smtp-client](https://github.com/nelsonhumberto/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](https://github.com/jetseven/skpsmtpmessage)).