472,800 Members | 1,292 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,800 software developers and data experts.

Email from Webpage Produces " A 'SendUsing" configuration value is invalid"

I'm new to .NET and just trying a few things out, like emailing. I created a
form in Visual Studio .Net to input some information for generating an email
and I'm getting the following error when it executes both on my server or on
the server of the .NET service provider. I'm obviously missing something
very basic and I'm hoping one of you can point out my error. Thank you for
your assistance.

Brian


**** ERROR MESSAGE ****
The "SendUsing" configuration value is invalid.
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
"SendUsing" configuration value is invalid.

Source Error:
Line 54: "Order Details" & OrderDetails.Text
Line 55:
Line 56: System.Web.Mail.SmtpMail.Send(EmailFrom, EmailTo, EmailSubject,
EmailBody)
Line 57:
Line 58: End Sub
Source File: c:\inetpub\wwwroot\Email User Control\EmailWebForm.aspx.vb
Line: 56


***** END OF ERROR MESSAGE WITH THE STACK TRACE OMITTED - I CAN SUPPLY THIS
IF REQUIRED *****

***** THIS IS THE VB.NET CODE BEHIND FORM *****

Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents ClientName As System.Web.UI.WebControls.TextBox
Protected WithEvents EmailAddress As System.Web.UI.WebControls.TextBox
Protected WithEvents OrderDetails As System.Web.UI.WebControls.TextBox
Protected WithEvents NameLabel As System.Web.UI.WebControls.Label
Protected WithEvents OrderDescriptionLabel As
System.Web.UI.WebControls.Label
Protected WithEvents PostalCodeText As System.Web.UI.WebControls.TextBox
Protected WithEvents MailingAddressTextBox As
System.Web.UI.WebControls.TextBox
Protected WithEvents MailingAddrLabel As System.Web.UI.WebControls.Label
Protected WithEvents PhoneNbr As System.Web.UI.WebControls.TextBox
Protected WithEvents EmailAddrLabel As System.Web.UI.WebControls.Label
Protected WithEvents PhoneNbrLabel As System.Web.UI.WebControls.Label
Protected WithEvents ProvinceStateText As System.Web.UI.WebControls.TextBox
Protected WithEvents PostalCodeLabel As System.Web.UI.WebControls.Label
Protected WithEvents ProvinceStateLabel As System.Web.UI.WebControls.Label
Protected WithEvents CancelButton As System.Web.UI.WebControls.Button
Protected WithEvents SubmitButton As System.Web.UI.WebControls.Button

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

End Sub

Private Sub SubmitButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SubmitButton.Click

Dim EmailTo As String
Dim EmailFrom As String
Dim EmailSubject As String
Dim EmailBody As String

EmailTo = "na**@domain.com"
EmailFrom = EmailAddress.Text
EmailSubject = "Website Email Order"
EmailBody = "Name: " & ClientName.Text & _
"Phone Number: " & PhoneNbr.Text & _
"Mailing Address: " & MailingAddressTextBox.Text & _
"Province / State: " & ProvinceStateText.Text & _
"Postal Code: " & PostalCodeText.Text & _
"Order Details" & OrderDetails.Text

System.Web.Mail.SmtpMail.Send(EmailFrom, EmailTo, EmailSubject, EmailBody)

End Sub
Private Sub CancelButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CancelButton.Click
EmailAddress.Text = ""
ClientName.Text = ""
PhoneNbr.Text = ""
MailingAddressTextBox.Text = ""
ProvinceStateText.Text = ""
PostalCodeText.Text = ""
OrderDetails.Text = "Enter Your Order Details Again"
End Sub
End Class
Jul 19 '05 #1
0 4460

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: tascien | last post by:
I cannot believe that this code causes an error: Dim MyCookie as string = Request.Cookies("Email").Value Object reference not set to an instance of an object. If the cookie is found, it...
0
by: Brian Morris | last post by:
I'm new to .NET and just trying a few things out, like emailing. I created a form in Visual Studio .Net to input some information for generating an email and I'm getting the following error when it...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
11
by: ajikoe | last post by:
Hello, I used Visual C# Standard Edition. I want to comment my program using xml commentary method, I don't know why if I use value and example tag, it is not working / showed in the html...
7
by: Dica | last post by:
i've used the sample code from msdn to create an encyption/decryption assembly as found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT10.asp i'm...
5
by: lds | last post by:
I am getting the following error: The "SendUsing" configuration value is invalid. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
5
by: Mark Ingram | last post by:
Hi, ive written a custom control and i would like to display the "invalid property value" dialog box for certain properties on my form if the user enters a value outside the allowed range (in the...
1
by: samarthkumar84 | last post by:
Hi I had used following code for sending e-mail but facing this problem. I want to send this e-mail in ASP.NET using VB.NET code. I am attaching both code an output. CODE Imports...
1
by: mark | last post by:
Forgive me if this seems like a stupid question but I need help... I'm trying to do a simple online form that emails me the results from a few fields. Here is the code: <form...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.