Thx cyberRobot, i finaly got it working, slightly different code. Its very basic but works for me since im new to PHP
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$telefon = $_POST['telefon'];
$liik = $_POST['liik'];
$message = $_POST['message'];
$email_message = "
Nimi: ".$name."
E-post: ".$email."
Telefon: ".$telefon."
Töö Liik: ".$liik."
Töö kirjeldus: ".$message."
";
mail ("@outlook.com" , "Hinnapäring", $email_message);
if (mail) { ?>
<script language="javascript" type="text/javascript">
alert('Saadetud');
window.location = 'hinnaparing.html';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Saatmisel esines viga');
window.location = 'hinnaparing.html';
</script>
<?php
}
?>
Im curious if its possible to change the sender to email typed in the form. Right now the web host sends me the message. I could Reply faster if it would refer the email as sender. If its possible can someone give me a head start what should i do?