Send multiple attachements through SMTP Mail (1 Viewer)

mtn

Registered User.
Local time
Today, 03:34
Joined
Jun 8, 2009
Messages
54
Good afternoon,

Please I need your assistance. My code works fine when I send only one file but it doesn't when I have muliple files. I have tried to use the following (just a portion of my code) without any luck.

'Declerations
Dim iCount As Long
Dim iArray() As String

...other lines of codes
strAttachement = "C:\Users\mtn\Desktop\eware\Jinr.ini,C:\Users\mtn\Desktop\eware\StrSto.dll"

iArray = Split(strAttachement, ",")
If Dir(strAttachement) <> "" And strAttachement <> "" Then
For iCount = LBound(iArray) To UBound(iArray)
objMessage.AddAttachment (iArray(iCount))
Next
End If

Please what am I doing wrong?
If I use the following for Outlook mail it works for multiple attachements but not for SMTP.

OutlookMail.Attachments.Add (iArray(iCount))

Thanks.
 

Users who are viewing this thread

Top Bottom