-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Arun Raj.C
Message 1 in Discussion


Hi Friends,

I developed Visual Basic 6.0 Component for sending mail, its for sending
a specific set of files, in zipped format, I am using CDONTS and pkzip
for zip.

 

If Len(Trim(strAttachment)) > 0 Then

        ' Creating the Zip File

        vntShellReturn = Shell(App.Path
& "\pkzipc -add " & strOutputFile & " " & strAttachment)

    End If

Set objFso = CreateObject("Scripting.FileSystemObject")

 

    Set Flds = iConf.Fields

    Flds(cdoSendUsingMethod) = cdoSendUsingPort

    Flds(cdoSMTPServer) = strServer

    Flds(cdoSMTPServerPort) = 25

    Flds(cdoSMTPConnectionTimeout) = 10

    Flds(cdoContentType) = cdoTextHTML

    ' ... other settings

    Flds.Update

 

    Dim iMsg As New CDO.Message

    Set iMsg.Configuration = iConf

 

 

With iMsg

    .To = strTo

    .From = strFrom

    .Subject = strSubject

    .TextBody = strBody

    .HTMLBody = strBody

    If objFso.FileExists(App.Path & "\" & strOutputFile)
Then

        If Len(Trim(strAttachment))
> 0 Then

           
.AddAttachment App.Path & "\" & strOutputFile

        End If

    End If

    .Send

 

End With

In the above code I have the following problem, Before the process of
zipping the file is over, the codes checks for File exists and sends the
mail, so I am not getting attachments. I tried creating a delay using a
empty for loop. but then also the same problem. The process of creating
the zip file is run outside the process of this component.

The process of attaching the file should be done after the process of
zipping the file. Is there any other way of zipping files ? Any API available
??

Pls help me in solving this problem...

Thanks in Advance...

King Regards

Arun Raj.C

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to