473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 4570

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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.