Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .controller('General', function($scope){
- $scope.EnvioMail= function() {
- $scope.contactos=[{correo:"Mail1@gmail.com"},{correo:"mail2@gmail.com"},{correo:"mail3@gmail.com"},{correo:"mail4@gmail.com"}];
- for(var i=0; i<$scope.contactos.length;i++){
- alert($scope.contactos[i].correo);
- }
- $scope.nombre="ejemplo@gmail.com";
- if(window.plugins && window.plugins.emailComposer) {
- window.plugins.emailComposer.showEmailComposerWithCallback(function(result) {
- alert("Response ->");
- },
- "Esta es una prueba para enviar mails desde tu aplicacion ionic", // Subject
- "", // Body
- [$scope.nombre], // To EN ESTA PARTE QUIERO ENVIARLE A $scope.contactos[i].correo
- null, // CC
- null, // BCC
- false, // isHTML
- null, // Attachments
- null); // Attachment Data
- }
- }
- })
- <ion-content ng-controller='General'>
- <br><br>
- <button class="button button-assertive" ng-click="EnvioMail()">enviar mail</button>
- </ion-content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement