473,836 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Te xt
Line 55:
Line 56: System.Web.Mail .SmtpMail.Send( EmailFrom, EmailTo, EmailSubject,
EmailBody)
Line 57:
Line 58: End Sub
Source File: c:\inetpub\wwwr oot\Email User Control\EmailWe bForm.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.P age
Protected WithEvents ClientName As System.Web.UI.W ebControls.Text Box
Protected WithEvents EmailAddress As System.Web.UI.W ebControls.Text Box
Protected WithEvents OrderDetails As System.Web.UI.W ebControls.Text Box
Protected WithEvents NameLabel As System.Web.UI.W ebControls.Labe l
Protected WithEvents OrderDescriptio nLabel As
System.Web.UI.W ebControls.Labe l
Protected WithEvents PostalCodeText As System.Web.UI.W ebControls.Text Box
Protected WithEvents MailingAddressT extBox As
System.Web.UI.W ebControls.Text Box
Protected WithEvents MailingAddrLabe l As System.Web.UI.W ebControls.Labe l
Protected WithEvents PhoneNbr As System.Web.UI.W ebControls.Text Box
Protected WithEvents EmailAddrLabel As System.Web.UI.W ebControls.Labe l
Protected WithEvents PhoneNbrLabel As System.Web.UI.W ebControls.Labe l
Protected WithEvents ProvinceStateTe xt As System.Web.UI.W ebControls.Text Box
Protected WithEvents PostalCodeLabel As System.Web.UI.W ebControls.Labe l
Protected WithEvents ProvinceStateLa bel As System.Web.UI.W ebControls.Labe l
Protected WithEvents CancelButton As System.Web.UI.W ebControls.Butt on
Protected WithEvents SubmitButton As System.Web.UI.W ebControls.Butt on

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub InitializeCompo nent()

End Sub

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

#End Region

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

End Sub

Private Sub SubmitButton_Cl ick(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles SubmitButton.Cl ick

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

EmailTo = "na**@domain.co m"
EmailFrom = EmailAddress.Te xt
EmailSubject = "Website Email Order"
EmailBody = "Name: " & ClientName.Text & _
"Phone Number: " & PhoneNbr.Text & _
"Mailing Address: " & MailingAddressT extBox.Text & _
"Province / State: " & ProvinceStateTe xt.Text & _
"Postal Code: " & PostalCodeText. Text & _
"Order Details" & OrderDetails.Te xt

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

End Sub
Private Sub CancelButton_Cl ick(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles CancelButton.Cl ick
EmailAddress.Te xt = ""
ClientName.Text = ""
PhoneNbr.Text = ""
MailingAddressT extBox.Text = ""
ProvinceStateTe xt.Text = ""
PostalCodeText. Text = ""
OrderDetails.Te xt = "Enter Your Order Details Again"
End Sub
End Class
Jul 19 '05 #1
0 4620

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

Similar topics

3
4610
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 works, if the cookie is not found, the error above is triggered. and i can't just do this: Dim MyCookie as string = Request.Cookies("Email")
0
444
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 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
3
2747
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 reports at the plan (overall totals), department and division levels which have sorting and grouping implemented with this new
11
2659
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 result. for example I have Property ///<value>this is in description</value> ///<example>this is in Example</example> public int A{
7
17882
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 able to encrypt and then decrypt data okay as in the following code: // encrypt the data // Encryptor enc = new Encryptor(EncryptionAlgorithm.TripleDes); byte key = Encoding.ASCII.GetBytes("0123456789012345");
5
15140
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 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.
5
2768
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 visual studio designer). e.g. If i had a percentage property, i would want the user only to be able to enter Int32 values between 0&100. How can i do this?
1
6723
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 System.Web.HttpCookie Imports System.Web.Mail Imports System.Web.Mail.SmtpMail
1
7088
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 action="http://cm1web1/WebSurveyComponents/script/ processform.asp" method="post">
0
9818
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9668
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10844
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10546
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9374
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4016
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3113
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.