判断操作系统版本
If (Environment.OSVersion.Platform <> PlatformID.Win32NT) Then
Throw New PlatformNotSupportedException(SR.GetString("RequiresNT"))
End If
If ((Environment.OSVersion.Version.Major >= 7) OrElse ((Environment.OSVersion.Version.Major = 6) AndAlso (Environment.OSVersion.Version.Minor >= 1))) Then
Throw New PlatformNotSupportedException(SR.GetString("SmtpMail_not_supported_on_Win7_and_higher"))
End If
If (Environment.OSVersion.Version.Major <= 4) Then
CdoNtsHelper.Send(from, [to], subject, messageText)
Else
CdoSysHelper.Send(from, [to], subject, messageText)
End If
Throw New PlatformNotSupportedException(SR.GetString("RequiresNT"))
End If
If ((Environment.OSVersion.Version.Major >= 7) OrElse ((Environment.OSVersion.Version.Major = 6) AndAlso (Environment.OSVersion.Version.Minor >= 1))) Then
Throw New PlatformNotSupportedException(SR.GetString("SmtpMail_not_supported_on_Win7_and_higher"))
End If
If (Environment.OSVersion.Version.Major <= 4) Then
CdoNtsHelper.Send(from, [to], subject, messageText)
Else
CdoSysHelper.Send(from, [to], subject, messageText)
End If
浙公网安备 33010602011771号