Hi,
I'm using the following to send email. It works fine if I attach a text
file. However, if I attach a zip file, as shown, I get the following error
on the send:
"The transport lost its connection to the server."
If I send the same attachment via the same server using Outlook, all is
well. It only fails when sent using this script. The issue is not related
to file size, it works with huge text files, but fails on tiny zip files.
Suggestions gratefully received!
'Code begins here
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Something"
objMessage.To = "someone@somewhere.co.uk"
objMessage.From = "someone@somewhereelse.co.uk"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mailhost.myisp.co.uk"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.AddAttachment "C:\attach.zip"
objMessage.Send
'Code ends here