V
V
VitaliyBorys2018-09-06 20:09:32
PHP
VitaliyBorys, 2018-09-06 20:09:32

How to change the letter encoding?

This letter comes in the wrong encoding, with crocozyabrs.

<!DOCTYPE html>
<html lang="fr">
<head>
  <meta charset="utf-8">
  <title>Vos informations d'identification</title>
  <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
</head>
<body style="padding: 25px; font-family: 'Roboto', sans-serif;">
  <!-- <img style="width: 125px;" src="https://static1.squarespace.com/static/555b4653e4b09b331f3a25ed/t/5729221920c647e5196d288e/1534013511503/?format=1500w" alt="Anticafe"> -->
  <p>Ça y est, vous disposez désormais d'un Pass Anticafé! Bienvenue!</p>

  <p>Voici vos informations d'identification pour consulter la disponibilité des espaces en ligne et votre crédit en temps réel:</p>
  <br>

  <p>- Nom d'utilisateur: <b>{{ username }}</b></p>
  <p>- Mot de passe: <b>{{ password }}</b></p>
  <br>

  <p>Nous souhaitons adapter notre système au plus proche de vos (folles ?) envies , n'hésitez pas à nous contacter par mail à l'adresse [email protected]</p>
  <br>

  <p>À très bientôt dans nos espaces !</p>
  <br>
  <img src="{{ asset('assets/png/mailservice.png') }}" alt="Anticafe">
</body>
</html>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Darkhan Kamaliev, 2018-09-06
@darakanoit

<?php

      
   $to = '[email protected]';       
   $from = '[email protected]'; 
   $subject = 'Заявка'; 
   $subject = '=?utf-8?b?'. base64_encode($subject) .'?='; 
   $headers = "Content-type: text/plain; charset=\"utf-8\"\r\n"; 
   $headers .= "From: ". $from ." <". $from ."> \r\n";    

   
   mail($to, $subject, "  текст  " , $headers);
    
    echo 'Отправлено'; ?>

I use this script to send, try to compare with yours. And try to complete.

D
Dmitry, 2018-09-06
@slo_nik

Try setting the encoding with$mail->CharSet = 'UTF-8';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question