S
S
swks2015-06-03 18:00:47
css
swks, 2015-06-03 18:00:47

emil2sms not working, what should I do?

I have a simple form for sending a message from the site to the mail, I registered on sms.ru in order to use the emil2sms service, everything should work this way a person fills out the form for sending a message, the message arrives at the mailbox of the sms.ru service and accordingly comes to the phone , but alas, there are some problems with the encoding, the Cyrillic alphabet is not displayed in the message on the phone, everything is ok with Latin characters, if anyone knows, tell me what the problem is?
I thought that the problem might be in the encoding of the files, but no, I checked for messages in the mail and everything is OK, it is displayed as Cyrillic and Latin characters.
here is the submit form code

<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Заказать звонок</title>
</head>
<body>
<form id="contact-form" name="contact_form" method="POST" action="mail.php">
<div>
<label>
<span>Имя: </span>
<input placeholder="Please enter your name" type="text" name="name" tabindex="1" required autofocus>
</label>
</div>
<div>
<label>
<span>Тел: </span>
<input placeholder="Please enter your email address" type="text" name="tel" tabindex="2" required>
</label>
</div>
<div>
<button name="submit" type="submit" value="Submit" id="contact-submit">Send Email</button>
</div>
</form>
</body>
</html>

and php code
<?php
header('Content-Type: text/html; charset=utf-8');
    $name = $_POST['name'];
    $tel = $_POST['tel'];
    $from = 'Partners';
    $to = 'блаблабла@gmail.com';

    $body = "From: $name\n Tel: $tel";


if ($_POST['submit']) {
    if (mail ($to, $body, $from)) {
        echo '<p>Your message has been sent!</p>';
    } else {
        echo '<p>Something went wrong, go back and try again!</p>';
    }
}
?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question