Gustav Brock
Gustav at cactus.dk
Mon Dec 3 11:28:20 CST 2007
Hi Max I would install the (free) SMTP service of IIS on the user's machine or another machine on the LAN and use that for the outgoing SMTP transport. This way CDO only needs to pass the messages to the local service (which is nothing more than dropping it in a folder) which lasts for no more than a split second. From that on, the transport happens between the SMTP service and the receiving SMTP server (or the ISP if the SMTP at him is used as smart host to buffer it and pass it on as possible). /gustav >>> max.wanadoo at gmail.com 03-12-2007 17:47 >>> Yes, thanks Gustav, I think that is a good solution. BCC myself in and when that comes through then I will know it has gone. However, from what you are saying, there is no way that I can tell whether or not the SMTP Sever has taken it. Perhaps I should have just expanded a bit on my problem. We are trying to capture this funcitionality in VB6 and once the user has click on SEND EMAIL, it runs CDO and then exits the program. This works ok in Access 3K but not in VB6. Having run the cdo bit it then errors out when trying to exit the program. The person running it has a dial-up connection which is terribly slow and for a large email attachment it can take some time, but no way of knowing how long unless we divide the attachment size by say, 3Kbytes and then add a safety margin and then close down. I guess we could minimize the app while it was doing this and as long as the user didn't switch off or drop the dial-up then it should work. Thanks a million. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, December 03, 2007 4:24 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] CDO Windows Handles Hi Max You wouldn't know. That process runs asynchronously. CDO delivers the mail to the SMTP server - this will normally not fail except for disk I/O failures - and from that point on the delivery is in the hands of the SMTP server. Should delivery fail, it will try a couple of times more, the receiver may be busy and request a delay and retry. This can take days and you wouldn't wish to wait for that. What you can do is to pick up a failure of delivery note from the SMTP server, or you may somehow study the log file of the SMTP server which is a task on its own. Or - if you wish a quick positive feedback - set yourself (the application or system) as Bcc receiver on the mails you send, pick these up as they come in and mark those missing. However, you will only see what has been sent how and when, but not wether the mails actually reached the recipient. /gustav >>> max.wanadoo at gmail.com 03-12-2007 16:40 >>> Can anybody advise/help here please. I am using CDO to send emails and it works just fine BUT I can never tell when it has finished. What it does on the "cdo.send" is to pause for a second or two and then return to the statement following that line BUT I don't think it has actually sent it at that point. I think it has just "handed it over" to the system task scheduler (or something like that). I need to know that the actually event has truly finished. If it was a Shell I was using I could grab the handle, but as it is just a build-in function within the CDO events, this is not possible. Can anybody throw any light on this? Thanks Max