Changed to using here multiline strings instead
Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
parent
3ccc7de5b4
commit
fb75dd2255
22
dist/api/index.php
vendored
22
dist/api/index.php
vendored
@ -346,12 +346,12 @@ $app->post("/contact", function (Request $request, Response $response)
|
|||||||
$headers1 .= "MIME-Version: 1.0\r\n";
|
$headers1 .= "MIME-Version: 1.0\r\n";
|
||||||
$headers1 .= "Content-Type: text/html; charset=UTF-8\r\n";
|
$headers1 .= "Content-Type: text/html; charset=UTF-8\r\n";
|
||||||
|
|
||||||
$message1 = "
|
$message1 = <<<HEREA
|
||||||
<html lang=\"en\">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>{$data['subject']}</title>
|
<title>{$data['subject']}</title>
|
||||||
<style>
|
<style>
|
||||||
@import url(\"https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap\");
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap");
|
||||||
body {
|
body {
|
||||||
font-family: Noto Sans KR, sans-serif;
|
font-family: Noto Sans KR, sans-serif;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@ -406,17 +406,17 @@ $app->post("/contact", function (Request $request, Response $response)
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{$data['fName']}</td>
|
<td>{$data['fName']}</td>
|
||||||
<td>{$data['lName']}</td>
|
<td>{$data['lName']}</td>
|
||||||
<td><a href=\"mailto:{$data['email']}\">{$data['email']}</a></td>
|
<td><a href="mailto:{$data['email']}">{$data['email']}</a></td>
|
||||||
<td>{$data['subject']}</td>
|
<td>{$data['subject']}</td>
|
||||||
<td>{$data['message']}</td>
|
<td>{$data['message']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<hr>
|
<hr>
|
||||||
<p>Regards, <br> Rohit Pai <br> <a href=\"mailto:rohit@rohitpai.co.uk\">rohit@rohitpai.co.uk</a>
|
<p>Regards, <br> Rohit Pai <br> <a href="mailto:rohit@rohitpai.co.uk">rohit@rohitpai.co.uk</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
";
|
HEREA;
|
||||||
|
|
||||||
mail($data["email"], $data["subject"], $message1, $headers1);
|
mail($data["email"], $data["subject"], $message1, $headers1);
|
||||||
|
|
||||||
@ -426,12 +426,12 @@ $app->post("/contact", function (Request $request, Response $response)
|
|||||||
$headers2 .= "MIME-Version: 1.0\r\n";
|
$headers2 .= "MIME-Version: 1.0\r\n";
|
||||||
$headers2 .= "Content-Type: text/html; charset=UTF-8\r\n";
|
$headers2 .= "Content-Type: text/html; charset=UTF-8\r\n";
|
||||||
|
|
||||||
$message2 = "
|
$message2 = <<<HEREB
|
||||||
<html lang=\"en\">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>{$data['subject']}</title>
|
<title>{$data['subject']}</title>
|
||||||
<style>
|
<style>
|
||||||
@import url(\"https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap\");
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap");
|
||||||
body {
|
body {
|
||||||
font-family: Noto Sans KR, sans-serif;
|
font-family: Noto Sans KR, sans-serif;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@ -484,14 +484,14 @@ $app->post("/contact", function (Request $request, Response $response)
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{$data['fName']}</td>
|
<td>{$data['fName']}</td>
|
||||||
<td>{$data['lName']}</td>
|
<td>{$data['lName']}</td>
|
||||||
<td><a href=\"mailto:{$data['email']}\">{$data['email']}</a></td>
|
<td><a href="mailto:{$data['email']}">{$data['email']}</a></td>
|
||||||
<td>{$data['subject']}</td>
|
<td>{$data['subject']}</td>
|
||||||
<td>{$data['message']}</td>
|
<td>{$data['message']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
";
|
HEREB;
|
||||||
|
|
||||||
mail("rohit@rohitpai.co.uk", "{$data['fName']} {$data['lName']} filled in the form", $message2, $headers2);
|
mail("rohit@rohitpai.co.uk", "{$data['fName']} {$data['lName']} filled in the form", $message2, $headers2);
|
||||||
return $response->withStatus(201);
|
return $response->withStatus(201);
|
||||||
|
@ -346,12 +346,12 @@ $app->post("/contact", function (Request $request, Response $response)
|
|||||||
$headers1 .= "MIME-Version: 1.0\r\n";
|
$headers1 .= "MIME-Version: 1.0\r\n";
|
||||||
$headers1 .= "Content-Type: text/html; charset=UTF-8\r\n";
|
$headers1 .= "Content-Type: text/html; charset=UTF-8\r\n";
|
||||||
|
|
||||||
$message1 = "
|
$message1 = <<<HEREA
|
||||||
<html lang=\"en\">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>{$data['subject']}</title>
|
<title>{$data['subject']}</title>
|
||||||
<style>
|
<style>
|
||||||
@import url(\"https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap\");
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap");
|
||||||
body {
|
body {
|
||||||
font-family: Noto Sans KR, sans-serif;
|
font-family: Noto Sans KR, sans-serif;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@ -406,17 +406,17 @@ $app->post("/contact", function (Request $request, Response $response)
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{$data['fName']}</td>
|
<td>{$data['fName']}</td>
|
||||||
<td>{$data['lName']}</td>
|
<td>{$data['lName']}</td>
|
||||||
<td><a href=\"mailto:{$data['email']}\">{$data['email']}</a></td>
|
<td><a href="mailto:{$data['email']}">{$data['email']}</a></td>
|
||||||
<td>{$data['subject']}</td>
|
<td>{$data['subject']}</td>
|
||||||
<td>{$data['message']}</td>
|
<td>{$data['message']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<hr>
|
<hr>
|
||||||
<p>Regards, <br> Rohit Pai <br> <a href=\"mailto:rohit@rohitpai.co.uk\">rohit@rohitpai.co.uk</a>
|
<p>Regards, <br> Rohit Pai <br> <a href="mailto:rohit@rohitpai.co.uk">rohit@rohitpai.co.uk</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
";
|
HEREA;
|
||||||
|
|
||||||
mail($data["email"], $data["subject"], $message1, $headers1);
|
mail($data["email"], $data["subject"], $message1, $headers1);
|
||||||
|
|
||||||
@ -426,12 +426,12 @@ $app->post("/contact", function (Request $request, Response $response)
|
|||||||
$headers2 .= "MIME-Version: 1.0\r\n";
|
$headers2 .= "MIME-Version: 1.0\r\n";
|
||||||
$headers2 .= "Content-Type: text/html; charset=UTF-8\r\n";
|
$headers2 .= "Content-Type: text/html; charset=UTF-8\r\n";
|
||||||
|
|
||||||
$message2 = "
|
$message2 = <<<HEREB
|
||||||
<html lang=\"en\">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>{$data['subject']}</title>
|
<title>{$data['subject']}</title>
|
||||||
<style>
|
<style>
|
||||||
@import url(\"https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap\");
|
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap");
|
||||||
body {
|
body {
|
||||||
font-family: Noto Sans KR, sans-serif;
|
font-family: Noto Sans KR, sans-serif;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@ -484,14 +484,14 @@ $app->post("/contact", function (Request $request, Response $response)
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{$data['fName']}</td>
|
<td>{$data['fName']}</td>
|
||||||
<td>{$data['lName']}</td>
|
<td>{$data['lName']}</td>
|
||||||
<td><a href=\"mailto:{$data['email']}\">{$data['email']}</a></td>
|
<td><a href="mailto:{$data['email']}">{$data['email']}</a></td>
|
||||||
<td>{$data['subject']}</td>
|
<td>{$data['subject']}</td>
|
||||||
<td>{$data['message']}</td>
|
<td>{$data['message']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
";
|
HEREB;
|
||||||
|
|
||||||
mail("rohit@rohitpai.co.uk", "{$data['fName']} {$data['lName']} filled in the form", $message2, $headers2);
|
mail("rohit@rohitpai.co.uk", "{$data['fName']} {$data['lName']} filled in the form", $message2, $headers2);
|
||||||
return $response->withStatus(201);
|
return $response->withStatus(201);
|
||||||
|
Loading…
Reference in New Issue
Block a user