473,288 Members | 1,743 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,288 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 4547

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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.