发送包含报告的电子邮件作为附件 [英] Send email with report as an attachment

查看:109
本文介绍了发送包含报告的电子邮件作为附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

展开 | 选择 | Wrap | 行号

解决方案

DJ - 您只能添加附件的文件.Add


所以,您必须首先导出报告(我通常制作PDF),跟踪文件名,然后将其附加到您的代码中。


这是我所知道的最简单的方法。


Darn it。我通常使用Send对象,但我不能再添加电子邮件地址,所以这是我的下一个对象。它是如此奇怪你可以做一个而不是另一个......所以现在我必须找出出口部分。


感谢您的帮助。


DJRhino:

有没有人有任何想法?我做了一些搜索,所有内容都说首先导出报告然后附上它,我不想这样做。



不幸的是,作为一个附件,你可能知道,它并不是太有意义,它是一个文件 - 通常带有指示文件类型的扩展名。尝试使用任何不是文件的东西,除了没有允许你发送它的界面之外,在收到它时也没有意义。问问自己,如果收件人收到一些数据作为附件甚至不是文件,收件人会做什么,并且没有允许用指定的应用程序打开它的扩展名。


Expand|Select|Wrap|Line Numbers

解决方案

DJ - you can only add a file with Attachments.Add.

SO, you must export your Report first (I usually make a PDF), keep track of the file name, and then attach it in your code.

That is the easiest way I know of.


Darn it. I usually us the Send object, but I cannot add anymore email address to it, so this is my next object. Its so weird you can do one but not the other....So now I''ll have to figure out the export part.

Thanks for the help.


DJRhino:
Does anyone have any Ideas? I have done some searching and everything says to export the report first then attach it, which I prefer not to do.

Unfortunately that doesn''t make too much sense as an attachment, as you probably know, is a file - typically with an extension that indicates the type of file. Trying to use anything that isn''t a file, quite apart from there being no interface to allow you to send it, would also be meaningless when it''s received. Ask yourself what the recipient would do when they receive it if they receive some data as an attachment that isn''t even a file, and doesn''t have an extension that allows it to be opened with a specified application.


这篇关于发送包含报告的电子邮件作为附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆