Well, i had writen something wrong. It works!
One last question:
My form comsist of a lot of fields. So, should i write the code
$text = isset( $_POST['text'] ) ? sanitize_text_field($_POST['text']) : '';
if( $text !== '' ) {
wp_mail($my_email, $subject, $text);
echo '<p>Email sent!</p>';
}
for each field seperately?