sudo npm i -g grunt-cli bower nodemon
git clone https://github.digitas.fr/smahmal/Newsletter-Server.git
npm install && bower install
- Go to your app/views/HTMLnewsletter/
- Edit your newsletter.html :
- Replace nestlemail.bisystem.com/maggi/130327 by your Local IP+ express Port
- for example : 192.168.1.1:3000
grunt start # grunts + runs the server
- Browse to http://localhost:3000/emailing/youremail@gmail.com
- The webservice will email you a newsletter if no error.
- Your express server will serve the images.
- So, you're testing device should be in the same network as your server. (Wifi Network, or local test).
- If you launch the grunt on your local machine, you'll be able to acces to your served images from the Frontend hot spot
-
Place your newsletter's HTML and images on 'app/views/HTMLnewsletter/'
- newsletter.html
- images/*.html
-
Replace all you images link by the Ip corresponding to your machine + port your express is listenning on: -'./images' by 'http://10.0.2.55:3000/images'
-
The build will:
- Copy your images on public/images so it will be accessible.
- Copy your images on public/images so it will be accessible.
- Copy the html content of the email file 'newsletter.html'
-
Grunt start
-
Launch on your machine serving express
-
Browse to http://localhost:3000/emailing/youremail@gmail.com
-
Connect your phone on Frontend
-
Open your mail, you should see your newsletter, will all your images
-
Friendly user interface:
- Ajax to send mail throught the Webservice
- Dynamic replace of images link
-
Push images on a remote http server
-
Feel free to contributes