简体   繁体   English

mailto:在GroupWise 8消息中未正确设置字段

[英]mailto: does not properly set fields in a GroupWise 8 Message

I have been struggling all afternoon trying to get a simple mailto: tag to work. 整个下午,我一直在努力获取一个简单的mailto:标签以使其正常工作。 I've scoured the internet, but so far none of the suggested fixes have solved the problem. 我搜寻了互联网,但到目前为止,所建议的修复措施均未解决该问题。

The Problem 问题

I have a webpage that I want users to be able to send an email from. 我有一个网页,希望用户能够从中发送电子邮件。 This page will be used on an internal network, and requires that a recipient, subject, and body is dynamically added to the message when the button is clicked. 此页面将在内部网络上使用,并且要求在单击按钮时将收件人,主题和正文动态添加到邮件中。

To solve the problem, I am trying to use the mailto tag, and Groupwise 8 launches a new message correctly when I only have a recipient listed. 为了解决该问题,我尝试使用mailto标记,并且当我仅列出收件人时,Groupwise 8会正确启动新消息。 However, when trying to set anything other than the To: field, the data is simply appended to the To: field. 但是,当尝试设置“收件人:”字段以外的任何内容时,数据仅会附加到“收件人:”字段。

For example, in my jsp page I have this: 例如,在我的jsp页面中,我有以下内容:

<script type="text/javascript">
    function sendMail() {
        alert('Trying to send mail!');
        var link = "mailto:myaddress@mydomain.org"
             + "?subject=Testing the automated email template"
             + "&body=Testing testing testing" 
        ;
        window.location.href = link;
    }
</script>

...

<input type="button" onclick="sendMail();" value="Send email" />

So when I click the button, I would expect an email to myaddress@mydomain.org, with a subject of "Testing the automated email template", and a body of "Testing testing testing". 因此,当我单击按钮时,希望收到一封电子邮件至myaddress@mydomain.org,主题为“测试自动电子邮件模板”,主题为“测试测试”。 Instead, however, the entire link string is simply put into the To: field of the email message. 但是,相反,整个链接字符串只是放在电子邮件的“收件人:”字段中。

I have tried a number of variations of mailto, embedding the mailto into an <a> tag instead of Javascript, and escaping the string. 我尝试了多种mailto,将mailto嵌入到<a>标记而不是Javascript中,并转义了字符串。 Nothing changes the outcome when Groupwise creates the new message. Groupwise创建新消息时,什么都不会改变结果。

Any advice on how to fix this issue is greatly appreciated! 非常感谢您提供有关如何解决此问题的建议!

The only way I was able to solve this problem was to scrap using mailTo. 我能够解决此问题的唯一方法是使用mailTo进行剪贴。 I wound up having to create a new sendEmail action and bean in order to handle the creation of the email that in the logic part of the application. 我不得不创建一个新的sendEmail操作和bean,以便处理在应用程序逻辑部分中创建的电子邮件。

Hopefully this stops someone else from wasting their time trying to find a way to make GroupWise behave with <mailto:> ! 希望这可以避免其他人浪费时间尝试寻找一种方法使GroupWise与<mailto:>

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

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