diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 4802745d8..08169bcc8 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -217,6 +217,7 @@ * [Browser Tab](plugins/browser-tab.md) * [Dynamsoft Barcode Scanner](plugins/dynamsoft-barcode-scanner.md) * [GCDWebServer](plugins/gcdwebserver.md) + * [Smtp Client](plugins/smtp-client.md) * [Cashfree PG](plugins/cashfree-pg/README.md) * [Installation](installation.md) * [FAQ](faq.md) diff --git a/docs/plugins/smtp-client.md b/docs/plugins/smtp-client.md new file mode 100644 index 000000000..74c7754f6 --- /dev/null +++ b/docs/plugins/smtp-client.md @@ -0,0 +1,16 @@ +# Smtp Client + +```text +$ ionic cordova plugin add cordova-plugin-smtp-client +$ npm install @awesome-cordova-plugins/smtp-client +``` + +## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/smtp-client/) + +Plugin Repo: [https://github.com/CWBudde/cordova-plugin-smtp-client](https://github.com/CWBudde/cordova-plugin-smtp-client) + +## Supported platforms + +* Android +* iOS + diff --git a/docs/plugins/smtp-client/README.md b/docs/plugins/smtp-client/README.md new file mode 100644 index 000000000..65411db1f --- /dev/null +++ b/docs/plugins/smtp-client/README.md @@ -0,0 +1,20 @@ +# Smtp Client + +``` +$ ionic cordova plugin add cordova-plugin-smtp-client +$ npm install @awesome-cordova-plugins/smtp-client +``` + +## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/smtp-client/) + +Plugin Repo: [https://github.com/CWBudde/cordova-plugin-smtp-client](https://github.com/CWBudde/cordova-plugin-smtp-client) + + + +## Supported platforms + +- Android +- iOS + + + diff --git a/src/@awesome-cordova-plugins/plugins/cloud-settings/index.ts b/src/@awesome-cordova-plugins/plugins/cloud-settings/index.ts index f0a48d520..7f127efa0 100644 --- a/src/@awesome-cordova-plugins/plugins/cloud-settings/index.ts +++ b/src/@awesome-cordova-plugins/plugins/cloud-settings/index.ts @@ -29,10 +29,11 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl */ @Plugin({ pluginName: 'CloudSettings', - plugin: 'cordova-plugin-cloud-settings', + plugin: '@marysuon/cordova-plugin-cloud-settings', pluginRef: 'cordova.plugin.cloudsettings', repo: 'https://github.com/dpa99c/cordova-plugin-cloud-settings', - install: 'ionic cordova plugin add cordova-plugin-cloud-settings --variable ANDROID_BACKUP_SERVICE_KEY=myapikey', + install: + 'ionic cordova plugin add @marysuon/cordova-plugin-cloud-settings --variable ANDROID_BACKUP_SERVICE_KEY=myapikey', installVariables: ['ANDROID_BACKUP_SERVICE_KEY'], platforms: ['Android', 'iOS'], }) diff --git a/src/@awesome-cordova-plugins/plugins/smtp-client/index.ts b/src/@awesome-cordova-plugins/plugins/smtp-client/index.ts new file mode 100644 index 000000000..c5669958a --- /dev/null +++ b/src/@awesome-cordova-plugins/plugins/smtp-client/index.ts @@ -0,0 +1,70 @@ +import { Injectable } from '@angular/core'; +import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core'; + +/** + * @name Smtp Client + * @description + * @usage + * ```typescript + * import { SmtpClient } from '@awesome-cordova-plugins/smtp-client/ngx'; + * + * constructor(private smtpClient: SmtpClient) { } + * + * ... + * + * this.smtpClient.sendMail(mailSettings, success, failure); + * + * ``` + */ +@Plugin({ + pluginName: 'SMTPClient', + plugin: 'cordova-plugin-smtp-client', + pluginRef: 'smtpClient', + repo: 'https://github.com/CWBudde/cordova-plugin-smtp-client', + install: 'ionic cordova plugin add cordova-plugin-smtp-client', + platforms: ['Android', 'iOS'], +}) +@Injectable() +export class SmtpClient extends AwesomeCordovaNativePlugin { + /** + * The sendMail function. + * + * var mailSettings = { + * emailFrom: "emailFrom@domain.com", + * emailTo: "emailTo@domain.com", + * smtp: "smtp-mail.domain.com", + * smtpUserName: "authuser@domain.com", + * smtpPassword: "password", + * attachments: ["attachment1", "attachment2"], + * subject: "email subject", + * textBody: "write something within the body of the email" + * }; + * + * var successCallback = function(message) { + * alert(message); + * } + * + * var errorCallback = function(message) { + * alert("Error sending the email"); + * } + * + * @param mailSettings + * @param successCallback + * @param errorCallback + * @returns {Promise} + */ + @Cordova() + sendMail(mailSettings: any, successCallback: any, errorCallback: any): Promise { + return; + } + + /** + * You can call isLoaded to check if client is loaded. + * + * @returns {Promise} + */ + @Cordova() + isLoaded(): Promise { + return; + } +}