public IHttpActionResult SendEmail(EmailModel email) { var sendEmailResult = _utilityManager.SendEmailToUser(email.EmailAddress, email.Subject, email.Body); if (!sendEmailResult.IsSuccess) { return(GetErrorResult(sendEmailResult)); } else { return(Ok(sendEmailResult.Result)); } }
public IHttpActionResult PayAndGoIndividual(PayAndGoRegistration payAndGoRegistration) { //save to database here the new images //save to the database //send email to customer service here var result = _utilityManager.SendEmailToUser("*****@*****.**", "Pay and Go Sign Up", string.Format("The following user has signed up for Pay and Go: <br/><br/>" + "First Name : {0}<br/> LastName : {1}<br/> TRN : {2}<br/>Address : {3}<br/>Email Address : {4} <br/>UserName : {5}<br/>Password : {6}<br/>Mobile Number : {7}<br/>", payAndGoRegistration.PrimaryUser.FirstName, payAndGoRegistration.PrimaryUser.LastName, payAndGoRegistration.TRN, payAndGoRegistration.Address, payAndGoRegistration.PrimaryUser.Email, payAndGoRegistration.PrimaryUser.Username, payAndGoRegistration.PrimaryUser.Password, payAndGoRegistration.PrimaryUser.MobileNumber) ); if (result.IsSuccess) { _logger.Debug("test email sent"); return(Ok("Pay and Go Notification Sent")); } else { return(GetErrorResult(result)); } }