我并没有完全了解此Web开发内容,但是我在组建网站的过程中遇到了一个令人烦恼的问题:
I''m not all up-ons with this web development stuff but I''m part way through putting together a website and have come across an irritating problem:
mail("somebody@someaddress", $subject, $message, ''From: SomeName <someotherEmail@address>'' )它抱怨地址无效,我知道这是我必须在标题中设置的发件人"字段.那我想念什么明显的东西呢?如果仅我自己输入电子邮件地址,它就可以工作,但是当我尝试给它添加名称时,它在我的脸上冒了!
It complains about an invalid address, which I know to be the From field I have to set in the header. So what obvious thing am I missing? It works if I just put the email address by itself, but when I try to put a name to it, it blows up in my face!
推荐答案主题,
消息,来自:SomeName< someotherEmail@address>") message, ''From: SomeName <someotherEmail@address>'' )
它抱怨地址无效,我知道这是我必须在标题中设置的发件人"字段.那我想念什么明显的东西呢?如果我仅自己输入电子邮件地址,它就可以工作,但是当我尝试给它添加名称时,它在我的脸上冒了出来!
It complains about an invalid address, which I know to be the From field I have to set in the header. So what obvious thing am I missing? It works if I just put the email address by itself, but when I try to put a name to it, it blows up in my face!
我发现在电子邮件地址周围有一个非常奇怪的工作问题.神秘地调用mail之前调用ini_set("sendmail_from", "");可以使您使用友好名称.太疯狂了. I found a very strange work around to the problem. Calling ini_set("sendmail_from", ""); just prior to calling mail mysteriously allows you to use the friendly name. It''s madness.
更多推荐
PHP邮件功能,无效地址
发布评论