-
Notifications
You must be signed in to change notification settings - Fork 0
/
sendmail.php
41 lines (25 loc) · 976 Bytes
/
sendmail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
$fromEmail = strip_tags($_POST['email']);
$fromName = strip_tags($_POST['name']);
$phonenumber = strip_tags($_POST['phone']);
$subject = strip_tags($_POST['subject']);
$themessage = strip_tags($_POST['message']);
$themessage = $themessage."broj telefona pošiljatelja ".$phonenumber ;
$toEmail = 'support@plus.hr';
$toName = 'Plus Hosting';
// Mail::send('emails.contactus', $data , function($message) use ($toEmail, $toName, $fromEmail, $fromName, $subject)
// {
// $message->to($toEmail, $toName);
// $message->from($fromEmail, $fromName);
// $message->subject($subject);
// });
$headers = 'From:' .$fromName . "\r\n" .
'Reply-To:' .$fromEmail. "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($toEmail, $subject, $themessage, $headers))
{
// Send
echo "success";
}
else{ echo "Došlo je do pogreške prilikom slanja poruke"; }
?>