imeyili () ku-PHP nge-UTF-8 nama-umlauts

Ukuthumela i-imeyili nge-PHP kwenziwa kangcono ngezifundo ezinamandla njenge- PHPMailer . Imisebenzi e-wrapper elula yenza kube nokwenzeka ukusebenzisa okuqukethwe ku-UTF-8 ngemigqa embalwa yekhodi, ukushumeka izithombe nokuthumela okunamathiselwe okubhaliwe. Uma ufuna ukonga ngaphezulu futhi, ngokungafani nesincomo, sebenzisa i- imeyili yokusebenza ye-PHP () , uzohlangabezana nezinkinga kwakamuva lapho usebenzisa i-umlauts ne-UTF-8.


Ngemuva kokubiza umsebenzi nge

mail(
   "vieldav@gmx.de",                          // Empfänger
   "ä ö ü ß",                                 // Betreff
   "ä ö ü ß",                                 // Inhalt
   "From: ä ö ü ß <david@vielhuber.de>"       // Header (Absender)
);

kufayela elifakiwe le-UTF-8 selivele liholela ezinkingeni kubhokisi lokungenayo: I-Outlook 2013 isenomusa futhi ibonisa konke kahle:

mail1

Kodwa vele i-GMX ayixoleli izihloko ezilahlekile futhi ikhombisa isifundo esingaphumelelanga, umthumeli nokuqukethwe:

mail2

Uma uthumela izihloko ezifanele (ngokwesibonelo nge-base64_encode), uthola

mail(
   "vieldav@gmx.de",                          				  // Empfänger
   "=?UTF-8?B?".base64_encode("ä ö ü ß")."?=",                            // Betreff
   "ä ö ü ß",                                 			 	  // Inhalt
   "Content-type: text/plain; charset=utf-8\r\n"
  ."From: =?UTF-8?B?".base64_encode("ä ö ü ß")."?=<david@vielhuber.de>"   // Header (Absender)
);

futhi ekugcineni i-GMX ikhombisa isethulo esifanele:

mail3

Emuva