I am programming a mobile application in Ionic which uses angular/typescript. I am looking for a front end solution for sending email dynamically in the background to a pre-determined email address. I have tried to use emailjs but it is only a front-end solution if it is used with javascript which is not compatible with Ionic. The other mail client that I have found is for typescript and it is called "nodemailer". The tutorial I found for nodemailer is at this link; https://subscription.packtpub.com/book/application_development/9781786468710/12/ch12lvl1sec71/sending-mail
I followed the installation instructions for installing nodemailer but I got an error. The installation parts that installed successfully were;
- npm install --save nodemailer
- npm install @types/node --save
- npm install @types/nodemailer --save
- npm install @types/nodemailer-direct-transport --save
- npm install @types/nodemailer-smtp-transport --save
The installation that had an error was;
npm install @types/nodemailer-bluebird --save
The error for the above command was;
npm ERR! code E404
npm ERR! 404 Not Found: @types/nodemailer-bluebird@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Nicholas1\AppData\Roaming\npm-cache\ _logs\2019-09-09T17_59_48_776Z-debug.log
Any help with this error will be greatly appreciated because I could not find any helpful information online for the 404 error above. If you need any additional information please ask me.
Minimal Reproducible Example;
- install node.js and npm; https://www.npmjs.com/get-npm
- install ionic and cordova cli run: C:> npm install -g cordova ionic -> to see your ionic version run: ionic -v
- change to your workspace directory then install project and template with command; C:\Desktop> ionic start myApp blank
- Test app in web browser, it should work at this point and you will see text that says "The world is your oyster."; --> C:\Desktop\myApp> ionic serve
Follow install instructions at link; https://subscription.packtpub.com/book/application_development/9781786468710/12/ch12lvl1sec71/sending-mail
Next run the following commands, these are also the installation parts that you should be able to install successfully;
- C:\Desktop\myApp> npm install --save nodemailer
- C:\Desktop\myApp> npm install @types/node --save
- C:\Desktop\myApp> npm install @types/nodemailer --save
- C:\Desktop\myApp> npm install @types/nodemailer-direct-transport --save
- C:\Desktop\myApp> npm install @types/nodemailer-smtp-transport --save
Next install instruction, this should have an error;
npm install @types/nodemailer-bluebird --save
- The error for the above command was;
npm ERR! code E404 npm ERR! 404 Not Found: @types/nodemailer-bluebird@latest npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User1\AppData\Roaming\npm-cache\ _logs\2019-09- 09T17_59_48_776Z-debug.log