Skip to content

Instantly share code, notes, and snippets.

onSubmit(name, email, message) {
this._emailService.sendEmail({
from: 'Mailgun Sandbox <postmaster@sandboxXXXXXXXXXXXXXXXXXXXXX.mailgun.org>',
to: email,
name: name,
text: message,
})
.subscribe(
() => {},
err => console.log(err)
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
@Injectable()
export class EmailService {
constructor(private http: Http) { }
sendEmail(data) {
@kseniya292
kseniya292 / romannumeralconverter.js
Created July 24, 2016 15:01
Roman Numeral Converter Algorithm- freeCodeCamp
function convertToRoman(num) {
var romanArray = [];
while (num <= 3999 && num > 0) {
if (num >= 1000 && num <= 3999) {
romanArray.push("M");
@kseniya292
kseniya292 / whereforartthou.js
Last active July 24, 2016 15:02
Where For Art Thou Algorithm- freeCodeCamp
function whatIsInAName(collection, source) {
var arr = [];
for (var i = 0; i < collection.length; i++) {
var collectionObject = collection[i];
//console.log(collectionObject);
//loop through collection array to look at the objects. Put the collection objects into a variable called collectionObject
var perfectMatch = true;
//set this variable to true. This will be changed to false when next loop fails.