J
Jerry Camel
Let's try this again... I think I sent half a message before.
Things were working just fine and I'm not sure what changed. The code is pretty simple. But now I can't send a message anymore. I get this exception:
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800C000D): The specified protocol is unknown.
Code:
Dim msg As New MailMessage()
Dim attach As New MailAttachment(resultsFileName)
Dim i As Integer
msg.Attachments.Add(attach)
msg.From = "(e-mail address removed)"
msg.Subject = Application.ProductName & ": " & Now
SmtpMail.SmtpServer = smtpServer
For i = emailAddresses.GetLowerBound(0) To emailAddresses.GetUpperBound(0)
msg.To = emailAddresses(i)
SmtpMail.Send(msg)
Next i
I've searched and serarched and while I can find many references to the CDO.Message issue, none address the "Protocol is unknown" part.
Any help is truly appreciated...
Jerry
Things were working just fine and I'm not sure what changed. The code is pretty simple. But now I can't send a message anymore. I get this exception:
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800C000D): The specified protocol is unknown.
Code:
Dim msg As New MailMessage()
Dim attach As New MailAttachment(resultsFileName)
Dim i As Integer
msg.Attachments.Add(attach)
msg.From = "(e-mail address removed)"
msg.Subject = Application.ProductName & ": " & Now
SmtpMail.SmtpServer = smtpServer
For i = emailAddresses.GetLowerBound(0) To emailAddresses.GetUpperBound(0)
msg.To = emailAddresses(i)
SmtpMail.Send(msg)
Next i
I've searched and serarched and while I can find many references to the CDO.Message issue, none address the "Protocol is unknown" part.
Any help is truly appreciated...
Jerry