Reputation: 16793
Why does the opencart mail class encode the senders name?
$header .= 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
Is this an old technique? I haven't seen it like this before.
Are there any disadvantages to encoding it?
Upvotes: 1
Views: 1322
Reputation: 2086
Quoted from Wikipedia:
This is to ensure that the data remain intact without modification during transport. Base64 is commonly used in a number of applications including email via MIME. Base64
The MIME standard introduced character set specifiers and two content transfer encodings to enable transmission of non-ASCII data: quoted printable for mostly 7 bit content with a few characters outside that range and base64 for arbitrary binary data. Content Encoding
Upvotes: 2