export function sendSMS() {

	let username = "username@mail.com";
	let password = "************";
	let iUserID = ****;
	let message = "message to send";
	let phone = "05********;
	let sender = "sender name";

	let xml =
		`<?xml version="1.0" encoding="utf-8"?>`+
		`<soap12:Envelope xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns:soap12="https://www.w3.org/2003/05/soap-envelope">`+
			`<soap12:Body>`+
				`<SendSingleSmsMessage xmlns="https://messagingsystem.co.il/">`+
					`<oLogin>`+
						`<UserName>${username}</UserName>`+
						`<Password>${password}</Password>`+
					`</oLogin>`+
					`<iUserID>${iUserID}</iUserID>`+
					`<sMessageBody>${message}</sMessageBody>`+
					`<sToPhone>${phone}</sToPhone>`+
					`<sFromName>${sender}</sFromName>`+
				`</SendSingleSmsMessage>`+
			`</soap12:Body>`+
		`</soap12:Envelope>`;

	fetch( "https://ns.mesereser.com/Services/Services.asmx", {
		method: "POST",
		headers: {
			'Content-Type': 'application/soap+xml; charset=utf-8',
			'Host': 'heb.mesereser.com',
			'Content-Length': xml.length},
		body: xml
	})
  	.then(httpResponse => {
		console.log("Response: " + httpResponse.text());

		if (httpResponse.ok) {
			return "Message sent";
		} 
		else {
			return "Error sending message";
		}
  	})
	.catch(error => {
		console.log(error);
		return "Error sending message";
	});
}