简体   繁体   English

从网站打开新Outlook,mailTo链接过长,*。eml文件密件抄送字段未加载

[英]open new Outlook from website, too long mailTo Link, *.eml file bcc field not loaded

I'm trying to open a *.eml file with Microsoft Outlook 2010 and got problems with the bcc field. 我正在尝试使用Microsoft Outlook 2010打开*.eml文件,并且bcc字段出现问题。

Here is my eml file: 这是我的eml文件:

To: example@domain.com
Subject: Mail Subject
cc: cc@domain.com
bcc: bcc@domain.com
Content-Type: text/plain
MIME-Version: 1.0
X-Unsent: 1

Mail content

When I open this eml file with Outlook all entries work fine, except bcc . 当我使用Outlook打开此eml文件时,除bcc之外,所有条目均正常运行。 How can i bring the bcc field to work? 我怎样才能使bcc领域发挥作用?

Edit 编辑

I basicly want the same behavior of a mailto link on a webpage. 我基本上希望网页上的mailto链接具有相同的行为。 The user should click on a link and the default mailprogram (which is Outlook in the office where the software is used) should open. 用户应单击一个链接,然后应打开默认的邮件程序(在使用该软件的办公室中为Outlook)。 mailto links work fine until the link is not longer than about 2000 characters. mailto链接可以正常工作,直到链接长度不超过2000个字符为止。 In my case, the informations that I need to pass to Outlook are much longer than 2000 characters, so I tried to generate an *.eml file which doesn't work as expected. 以我为例,我需要传递给Outlook的信息比2000个字符长得多,因此我试图生成一个*.eml文件,该文件无法正常工作。

So what I need: 所以我需要:

  • a link similar to a mailto link 类似于mailto链接的链接
  • must work with more than 2000 characters 必须使用超过2000个字符
  • must work in Google Chrome & Outlook 2010 必须在Google Chrome和Outlook 2010中运行

What I got: 我得到了:

  • PHP 的PHP
  • JavaScript with jQuery jQuery的JavaScript

For your edit , you can use forms in this way: 为了进行编辑 ,您可以通过以下方式使用表单:

<form name="mailform" action="mailto:youremail@domain.com">
    <input type="hidden" name="bcc" value="youremailBCC@domain.com">
    <input type="hidden" name="Subject" value="Email subject">
    <input type="hidden" name="Body" value="A Big body ">
</form>
<a href="#" onclick="document.mailform.submit()">send email</a>

I used this on an Ubuntu machine, with Thunderbird and Gmail web as default mail client and Google Chrome and Firefox as browsers and both worked. 我在Ubuntu机器上使用了它,其中Thunderbird和Gmail Web作为默认邮件客户端,而Google Chrome和Firefox作为浏览器,两者都可以使用。 I don't know about outlook, you need to test it for outlook yourself ;) But notice, generally mailto links depends on user's machine. 我不了解Outlook,您需要自己对Outlook进行测试;)但是请注意,通常mailto链接取决于用户的计算机。

I found a solution for my given problem. 我为给定的问题找到了解决方案。

MailTo links are still too long and *.eml files won't work. MailTo链接仍然太长,*。eml文件不起作用。 But it's possible to generate a *.vbs file (Visual Basic Script) which will open up a new Outlook E-Mail send form with all the fields I need and a very long Body (tested with over 50000 characters). 但是可以生成一个* .vbs文件(Visual Basic脚本),该文件将打开一个新的Outlook E-Mail发送表单,其中包含我需要的所有字段和一个非常长的正文(已测试超过50000个字符)。 Here is a sample code for such an *.vbs file: 这是此类* .vbs文件的示例代码:

'Create an Outlook application object 
Set objoutlookApp = CreateObject("Outlook.Application") 

'Create Message 
Set objmessage = objoutlookApp.CreateItem(olMailItem) 
objmessage.TO = "mail1@domain.com;mail2@example.de"
objmessage.CC = "cc1@x.com;cc2@y.de"
objmessage.BCC = "bcc@domain.com"
objmessage.Subject = "E-Mail Subject"
objmessage.Body = "Here comes some text, followed by a newLine" & vbNewLine _
& "and here is a second Line with some special characters like the paragraph: " & chr(167) & ", a german umlaut: " & chr(228) & " or some quotes: "". Hope this will help!"
objmessage.display

set objmessage = Nothing
set objoutlookApp = Nothing

wscript.quit

Your problem is probably outside of your eml file. 您的问题可能在您的eml文件之外。 I've tested your file on my OSX machine and the bcc is showing in the Mail app. 我已经在OSX机器上测试了您的文件,并且密件抄送显示在Mail应用程序中。

However: bcc is by default not shown in outlook so now you could have 2 situations: 但是: 默认情况下,密件抄送未显示在Outlook中,因此现在您可能有两种情况:

  1. bcc is not shown, but might be set from your eml file, if this is not an issue: success! 密件抄送未显示,但如果不是问题,则可以从您的eml文件进行设置:成功!
  2. since bcc is not shown outlook might not set it. 由于未显示密件抄送,outlook可能未设置。 In that case you'd have to make it so that everyone enables bcc to be shown by default. 在这种情况下,您必须做到这一点,以便每个人都默认启用密件抄送。 (walk by all desktops, ask the adminstrator, ...) This might be a blocker if you are not allowed to require this change. (在所有桌面上走动,询问管理员,...。)如果不允许您进行此更改,则这可能是阻止程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM