我有一个脚本发送看起来像这样的电子邮件:
$headers = "From: test@example.com\r\n";
$headers .= "Reply-To: test@example.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=utf-8\r\n";
$headers .= "Content-Transfer-Encoding: 8bit";
$orgsubject = "A subject with some swedish characters like å, ä and ö";
$newsubject='=?UTF-8?B?'.base64_encode($orgsubject).'?=';
$body = 'A lot of text.
Some more text.
A long URL:
http://example.com/subpage/?id=1234&hash=23jh4lk2j3h4lkjh674598xzxlk2j34h&anotherhash=h2k3j4h23kh42kj34h2lk3';
Run Code Online (Sandbox Code Playgroud)
它彻底的测试,但一些用户来说,我认为Outlook用户,得到一个URL看起来像这样: http://example.com/subpage/?id=3D1234&hash=3D3D23jh4lk2j3h4lkjh674598xzxlk2j34h&anotherhash=3Dh2k3j4h23kh42kj34h2lk3 等号现在其次是"3D",这使在我的情况下,URL无用.我想这与Content-Transfer-Encoding或Content-type有关,我是否需要将正文消息编码为base64或其他东西?
刚发现这个论坛帖子:https://stackoverflow.com/a/7289434/513321 所以我删除了内容传输编码,它似乎工作正常,但另一方面,我永远无法重现URL包含的错误'3D'文字,所以我无法确定这会有效.有谁知道删除Content-Transfer-Encoding是否可以解决我的问题?
我已经在这里看到了一些与此相关的问题,但没有一个提供好的答案。
我需要的是一个 javascript (或者可能是某种使用 PHP/Apache 的插件),它可以找到图像中的颜色,并将它们替换为自定义调色板中最接近的颜色,在我的例子中是 NES Palette。如何才能做到这一点?
我正在尝试从Github API获取标记消息.它在这里说我应该使用这个URL:https:
//api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac
但是我在那里得到"Not found",即使我尝试自己的回购:https:
//api.github.com/repos/richbrat/testrepo/git/tags/6cec7db2ae2d0213644480ba58bcc4a277ae8a2b
我正在使用带有oauth令牌的node-github包,它对"repos"调用非常有效,但"gitdata"似乎不起作用.检查我回来的标题给了我一个暗示:
... "x-oauth-scopes":"user, public_repo, repo, gist","x-accepted-oauth-scopes":"repo" ...
Run Code Online (Sandbox Code Playgroud)
Gitdata似乎超出了我的范围.是否有可能将其纳入我的范围或是否有其他解决方案来获取标记消息?