Trouble in config send mail in .Net

Results 1 to 2 of 2

Thread: Trouble in config send mail in .Net

  1. #1
    Join Date
    Dec 1969

    Default Trouble in config send mail in .Net

    Hi all,<BR>I try sample of send mail and i get this error, please tell <BR>me what i need to config to send mail like i did with CDONTS object<BR> <BR> <BR>The "SendUsing" configuration value is invalid. <BR>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. <BR><BR>Exception Details: System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid. <BR><BR>Source Error: <BR><BR><BR>Line 40: <BR>Line 41: &#039;Now, to send the message, use the Send method of the SmtpMail class<BR>Line 42: SmtpMail.Send(objMM)<BR>Line 43: <BR>Line 44: <BR> <BR><BR>Source File: C:Workingaspnetsend_mail.aspx Line: 42 <BR><BR>Stack Trace: <BR><BR><BR>[COMException (0x80040220): The "SendUsing" configuration value is invalid.<BR>]<BR><BR>[TargetInvocationException: Exception has been thrown by the target of an invocation.]<BR> System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0<BR> System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473<BR> System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String methodName, Object[] args) +58<BR><BR>[HttpException (0x80004005): Could not access &#039;CDO.Message&#039; object.]<BR> System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String methodName, Object[] args) +111<BR> System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1516<BR> System.Web.Mail.SmtpMail.Send(MailMessage message) +49<BR> ASP.send_mail_aspx.btnSendFeedback_Click(Object sender, EventArgs e) in C:Workingaspnetsend_mail.aspx:42<BR> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108<BR> System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57<BR> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18<BR> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33<BR> System.Web.UI.Page.ProcessRequestMain() +1263<BR><BR> <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Trouble in config send mail in .Net

    you need to add the following line before the SmtpMail.Send line of code:<BR>SmtpMail.SmtpServer = "localhost"<BR><BR>hth<BR>matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts