|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
System.Web.Mail problemHi all,
When sending mail from within a windows service I get this exception: "The specified procedure could not be found" at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) It works fine on my development box, but not my other box. Development box is WinXP Pro SP2, "other" box is WinXP Pro SP1. Any ideas? Thanks Goran Hi Goran,
System.Web.Mail from .NET 1.1 internally uses CDOSYS to send mail. We need to first verify that whether CDOSYS works or not. Let's create a simple VBScript file, name it as "SendCdosysMail.vbs": VFrom=WScript.Arguments(0) VTo=WScript.Arguments(1) VSubject=WScript.Arguments(2) VBody=WScript.Arguments(3) VSMTPServer=WScript.Arguments(4) Set objMessage = CreateObject("CDO.Message") objMessage.Subject = VSubject objMessage.Sender = VFrom objMessage.To = VTo objMessage.TextBody = VBody objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi guration/sendusing") = 2 objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi guration/smtpserver") = VSMTPServer objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi guration/smtpserverport") = 25 objMessage.Configuration.Fields.Update objMessage.Send wscript.echo "Message sent" Then try to run this script on your "other box" with following command: cscript.exe SendCdosysMail.vbs "f***@email.com" "t*@email.com" "subject" "body" "localhost" Please tell me the result or exact error message it displays. From several reported cases of this error message, it seems related to corrupt MDAC installation; you may need to repair or reinstall MDAC: #How to check for MDAC version http://support.microsoft.com/kb/301202 By the way, if you're using .NET 2.0, it's recommended to use System.Net.Mail; for more info, please refer to http://www.systemwebmail.com and http://www.systemnetmail.com Sincerely, Walter Wang (waw***@online.microsoft.com, remove 'online.') Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. If you are using Outlook Express, please make sure you clear the check box "Tools/Options/Read: Get 300 headers at a time" to see your reply promptly. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Hi Walter,
My SMTP service was messed up. I figured out, after a number of unsuccessful tries of re-installation of SMTP service (I was getting some weird COM error messages), I would "repair" Windows. After that I re-installed SMTP service successfully, and everything worked fine. I did try running your script afterwards and it worked fine. Thanks Goran Show quoteHide quote "Walter Wang [MSFT]" <waw***@online.microsoft.com> wrote in message news:8Tlbd262GHA.3440@TK2MSFTNGXA01.phx.gbl... > Hi Goran, > > System.Web.Mail from .NET 1.1 internally uses CDOSYS to send mail. We need > to first verify that whether CDOSYS works or not. > > Let's create a simple VBScript file, name it as "SendCdosysMail.vbs": > > VFrom=WScript.Arguments(0) > VTo=WScript.Arguments(1) > VSubject=WScript.Arguments(2) > VBody=WScript.Arguments(3) > VSMTPServer=WScript.Arguments(4) > > Set objMessage = CreateObject("CDO.Message") > objMessage.Subject = VSubject > objMessage.Sender = VFrom > objMessage.To = VTo > objMessage.TextBody = VBody > > > objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi > guration/sendusing") = 2 > > objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi > guration/smtpserver") = VSMTPServer > > objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi > guration/smtpserverport") = 25 > objMessage.Configuration.Fields.Update > > objMessage.Send > wscript.echo "Message sent" > > Then try to run this script on your "other box" with following command: > > cscript.exe SendCdosysMail.vbs "f***@email.com" "t*@email.com" > "subject" "body" "localhost" > > Please tell me the result or exact error message it displays. > > From several reported cases of this error message, it seems related to > corrupt MDAC installation; you may need to repair or reinstall MDAC: > > #How to check for MDAC version > http://support.microsoft.com/kb/301202 > > By the way, if you're using .NET 2.0, it's recommended to use > System.Net.Mail; for more info, please refer to > http://www.systemwebmail.com and http://www.systemnetmail.com > > Sincerely, > Walter Wang (waw***@online.microsoft.com, remove 'online.') > Microsoft Online Community Support > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. If you are using Outlook Express, please make sure you clear the > check box "Tools/Options/Read: Get 300 headers at a time" to see your > reply > promptly. > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscriptions/support/default.aspx. > ================================================== > > This posting is provided "AS IS" with no warranties, and confers no > rights. >
Determining Sql Column name?
Newbee - Project with single module. IFormatProvider Change look of button (newbie-VB2005 EE) - filenames in ListBox Service not going to 'Started' No "MS .NET Framework 1.1 Wizards" How can I control positioning of child windows in an MDI form? MDI Form Position Error BC30002 XXXXX Is not defined |
|||||||||||||||||||||||