Skip to content

Instantly share code, notes, and snippets.

Last active Mar 27, 2017
What would you like to do?
'use strict';
angular.module('sendmailApp', [])
.controller('MailController', function ($scope,$http) {
$scope.loading = false;
$scope.send = function (mail){
$scope.loading = true;
$'/sendmail', {
from: 'CodeNx <>',
to: '',
subject: 'Message from AngularCode',
text: mail.message
$scope.loading = false;
$scope.serverMessage = 'Email sent successfully';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment