So I have made a contact form on my website. Everything works like a charm. However, the result beeing delivered to the email fail to display the ØÆÅ letters and instead only shows as weird symbols.. I have tried everything and feel really lost.
<?php
if (isset($_POST['submit']))
$sword = $_POST['swordy'];
$check = $_POST['check'];
$mailFrom = $_POST['mail'];
$message = $_POST['message'];
$ccname = $_POST['ccname'];
$droppy1 = $_POST['droppy1'];
$tel = $_POST['tel'];
$subject = 'Bryllupsinvitasjon ';
$mailTo = "your@email.com";
$headers = "From: ".$mailFrom;
$txt = " Du har motatt svar på bryllupsinvitasjon fra: ".$ccname."
Svar: $check
Telefonnummer: $tel
Allergier: $droppy1
Andre allergier/intolleranser/spørsmål/henvendelser: $message";
mail($mailTo, $subject, $txt, $headers);
header("Location: index.html?mailsendt");
?>
Try inserting the corresponding Unicode or HTML code for your specific character. I believe all three of your indicated chars are on this page: https://www.rapidtables.com/code/text/unicode-characters.html
Your email headers here aren't specifying UTF-8 encoding. You'll need to add that into the headers, specifically as part of the Content-Type
header, like so:
Content-Type: text/html; charset="UTF-8"
With that header, the email should display the characters properly.