Flex 4 coltware airxmail - 发送 vCal 预约
我正在使用 coltware.airxmail 从我的 Flex 应用程序发送电子邮件。
我想将从 Flex 生成的 VCalendar 约会文件直接发送到 Outlook,以便在日历视图中打开它们。我可以将 VCal 文件作为电子邮件附件发送,但是,这些文件不会在 Outlook 日历中“自动打开”,这需要用户双击该文件。
我一直在尝试将邮件的内容类型设置为“text/x-vCalendar”,并传入包含 VCal 文件的字节数组,但是,没有任何乐趣。 vCal 以 .txt 附件形式发送到空电子邮件!
我想知道是否有人以前使用过该套件,或者可以提出任何建议吗?
或者甚至建议他们使用另一个组件从 ActionScript 直接将 VCal 文件发送到 Outlook?
这是我的示例代码(演示代码非常混乱只是为了了解要点):
var sender:SMTPSender = new SMTPSender();
// 在此处设置 from / to / host / port 值var contentType:ContentType = new ContentType();
contentType.setMainType("text/x-vCalendar");
var message:MimeMessage = new MimeMessage(contentType,"UTF-8");
var file:File = File.desktopDirectory.resolvePath("vcal.vcs");
file.addEventListener(Event.COMPLETE, 函数(ev:事件):void {
<块引用>message.addRawContent(file.data); 发送者.发送(消息); 发送者.close();
});
文件.load();
希望我可以使用 coltware 组件来实现这一点。他们的网站上没有任何关于使用这些方法的内容,尽管 API 指南非常不完整 - 只是“基本用法”... http://code.google.com/p/airxmail/wiki/HowToUseAPI
I am using coltware.airxmail to send emails from my Flex app.
I would like to send VCalendar appointment files generated from Flex straight to Outlook so they are opened in the Calender view. I am able to send the VCal files as an attachment on an email, however, these are not "auto-opened" in Outlook Calendar, which requires the user to double click on the file.
I have been trying to set the content type of the mail to "text/x-vCalendar", and pass in a byte array containing the VCal file, however, no joy. The vCal arrives as a .txt attachment to an empty email!
I wonder if anyone has had previous experience with this kit, or can suggest any pointers?
Or even suggest another component they have used to send VCal files straight to outlook, from ActionScript?
Here's my sample code (DEMO CODE VERY MESSY JUST TO GET POINT ACROSS):
var sender:SMTPSender = new SMTPSender();
// Set the from / to / host / port values herevar contentType:ContentType = new ContentType();
contentType.setMainType("text/x-vCalendar");
var message:MimeMessage = new MimeMessage(contentType,"UTF-8");
var file:File = File.desktopDirectory.resolvePath("vcal.vcs");
file.addEventListener(Event.COMPLETE,
function(ev:Event):void {message.addRawContent(file.data); sender.send(message); sender.close();
});
file.load();
Hopefully I can achieve this using the coltware component. There's nothing on their site about using these methods, although the API guide is very incomplete - just "basic usage"... http://code.google.com/p/airxmail/wiki/HowToUseAPI
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试使用不同的内容类型,例如“文本/日历”?请参阅此处:http://weblogs.asp。网/bradvincent/archive/2008/01/16/creating-vcalendars-programmatically.aspx
Did you try using a different content type, such as "text/calendar"? see here: http://weblogs.asp.net/bradvincent/archive/2008/01/16/creating-vcalendars-programmatically.aspx