且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过CDO和附件发送邮件

更新时间:2023-01-17 09:45:36

我想我不明白问题出在哪里所在。您说您将数据库设置为仅在存在截止日期时生成报告,那么为什么您不希望在没有报告时触发代码?你是如何调用代码开始的?


问候,

Scott



我想我不明白问题出在哪里。您说您将数据库设置为仅在存在截止日期时生成报告,那么为什么您不希望在没有报告时触发代码?你是如何调用代码开始的?


问候,

Scott



数据库为每个可能有或没有最后期限的程序人员运行查询。如果他们有截止日期,则会创建报告。如果他们没有生成报告。我的代码目前正在说创建和发送电子邮件并将附件发送给该人,然后它为下一个人调用代码,依此类推。如果其中一个人(我打电话约15个潜水员)没有附加报告,我不希望收到他们的电子邮件。希望澄清事情。我可以在不使用CDO但是想要使用CDO时这样做,所以我没有得到Outlook警告。

希望你能帮帮忙。我不明白为什么应该停止发送的代码的一部分不起作用。

展开 | 选择 | 换行 | 行号


抛出
展开 | 选择 | Wrap | 行号


Hi, Access 2003. I have a DB that contains deadlines data. I have the DB set up to create a report for each person that has deadline within a certain time frame. I need to automate the DB so an email is sent when a report exists but an email is not sent if there is no report for people. I have CDO code that works great except for the do not send part. The following is that part of the code. Any help would be appreciated. Thanks!

Expand|Select|Wrap|Line Numbers

I guess I''m not understanding where the problem lies. You say you have the database set up to only generate a report when there exists a deadline, then why do you want to not fire the code when there is no report? How are you calling the code to begin with?

Regards,
Scott


I guess I''m not understanding where the problem lies. You say you have the database set up to only generate a report when there exists a deadline, then why do you want to not fire the code when there is no report? How are you calling the code to begin with?

Regards,
Scott

The DB runs a query for each of the program folks that could or could not have deadlines. If they have a deadline, a report is created. If they don''t a report is not generated. My code is currently saying create and email and send the attachment to that person then it calls code for the next person and so on. If one of the people (I call about 15 subs) does not have a report to attach, I do not want an email going out to them. Hope that clarifies things. I can do it when not using CDO but want to use CDO so I don''t get the Outlook warnings.
Hope you can help out. I don''t get why that one part of the code that should stop the sending doesn''t work.

登录 关闭
扫码关注1秒登录
通过CDO和附件发送邮件
发送“验证码”获取 | 15天全站免登陆
上一篇 : :IIS7 权限被拒绝 - ASP 文件写入下一篇 : 尝试从视图写入文件时,权限被拒绝

相关阅读

技术问答最新文章