Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2007, 04:16 AM
Registered User
 
Join Date: Aug 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default com+ mail component

Hi!

I developed an email component for sending emails with attachments.A part of the code looks like this:

Code:
 If oFSO.FolderExists(sFolder) Then
               Set oFolder = oFSO.GetFolder(sFolder)
                  For Each oFile In oFolder.Files
                      If InStr(oFile.Name, "_" & user) > 0 Then
                                     oMail.AddAttachment oFile.Path
                                     FileSize = Format((FileLen(oFile) / 1024) / 1024)
                                     SumSize = SumSize + FileSize
                                     oFSO.DeleteFile (oFile)

                      End If
                  Next
            End If
This is supposed to attach the files to the email and then to delete the files.The files are being sent,but if I check the folder where the files are supposed to be(from Windows),I see the that the files still exist.However,I cannot access the files(I get an Access denied error,even though I have the right permissions).How can I solve this problem?

Thanks in advance!

 
Old October 23rd, 2007, 08:54 AM
Authorized User
 
Join Date: Nov 2006
Posts: 31
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via ICQ to debasisdas Send a message via AIM to debasisdas
Default

That might be because of the file is being still used by your code or any other program.

Debasis





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
dotNet e-mail ecryption component not24 C# 1 July 9th, 2007 05:37 AM
CDOSYS Mail component error shrisangeeta Classic ASP Basics 1 May 5th, 2007 06:01 AM
component must be able to read the msg from mail schanda Pro PHP 0 August 17th, 2006 01:52 AM
E-Mail Component smitddv VB Components 0 February 20th, 2004 02:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.