Jump to content

rajvunnam

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About rajvunnam

rajvunnam's Achievements

0

Reputation

  1. Hi all I am trying to send a mail through ASP.NET in VB and here is the exception I get when I run the application (the email part of the code below has been edited for anonymity). I am not using Code behind for the ASPX page. It works fine when I comment out the SmtpMail.Send code. The requested body part was not found in this message. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: The requested body part was not found in this message. Source Error: Line 58: Line 59: SmtpMail.SmtpServer = "localhost" Line 60: SmtpMail.Send("someoneelse@something.com","someone@something.com","Subject","Body") Line 61: Response.Write("Mail sent") Line 62: Source File: c:\inetpub\wwwroot\csci589\WebForm1.aspx Line: 60 Stack Trace: [COMException (0x800cce05): The requested body part was not found in this message. ] [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0 System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473 System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) +29 System.Web.Mail.LateBoundAccessHelper.SetProp(Type type, Object obj, String propName, Object propValue) System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) [HttpException (0x80004005): Could not access 'CDO.Message' object.] System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) System.Web.Mail.CdoSysHelper.Send(MailMessage message) System.Web.Mail.CdoSysHelper.Send(String from, String to, String subject, String messageText) System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String messageText) ASP.WebForm1_aspx.disp1(Object s, CommandEventArgs e) in c:\inetpub\wwwroot\csci589\WebForm1.aspx:60 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) System.Web.UI.Page.ProcessRequestMain() I am working on a project for my masters. Any help in this regard is greatly apreciated. Bye
×
×
  • Create New...