Saturday, March 24, 2012
Trouble w sending email
Trying to send an email with .net from my home computer.
A very simple one...
***************************
<%@dotnet.itags.org. Page Language="VB" %>
<%@dotnet.itags.org. Import Namespace="System.Web.Mail" %>
<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
SmtpMail.Send( _
"kenneth.philp@dotnet.itags.org.sverige.nu", _
"kenneth.philp@dotnet.itags.org.sverige.nu", _
"Testing mail", _
"Just sending a test message!")
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server" ID="Form1">
<asp:Button id="Button1" onclick="Button1_Click" runat="server"
Text="Button"></asp:Button>
</form>
</body>
</html>
**********************
I'm getting this error message
********************************
Configurationvalue "SendUsing" not valid.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information abou
t
the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException:
Configurationvalue "SendUsing" not valid.
Source Error:
Line 4:
Line 5: Sub Button1_Click(sender As Object, e As EventArgs)
Line 6: SmtpMail.Send( _
Line 7: "kenneth.philp@dotnet.itags.org.sverige.nu", _
Line 8: "kenneth.philp@dotnet.itags.org.sverige.nu", _
*********************************
I've checked that smtp services are on
What does "Sendusing" indicate?
Cheers.
KennethThe problem might be cos you're not specifying the SMTP server to send
through.
"Kenneth P" <KennethP@.discussions.microsoft.com> wrote in message
news:E07039CF-3FD5-49CD-BF51-EE5BF7A5BFF6@.microsoft.com...
> Hi,
> Trying to send an email with .net from my home computer.
> A very simple one...
> ***************************
> <%@. Page Language="VB" %>
> <%@. Import Namespace="System.Web.Mail" %>
> <script runat="server">
> Sub Button1_Click(sender As Object, e As EventArgs)
> SmtpMail.Send( _
> "kenneth.philp@.sverige.nu", _
> "kenneth.philp@.sverige.nu", _
> "Testing mail", _
> "Just sending a test message!")
> End Sub
> </script>
> <html>
> <head>
> </head>
> <body>
> <form runat="server" ID="Form1">
> <asp:Button id="Button1" onclick="Button1_Click" runat="server"
> Text="Button"></asp:Button>
> </form>
> </body>
> </html>
> **********************
> I'm getting this error message
> ********************************
> Configurationvalue "SendUsing" not valid.
> 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:
> Configurationvalue "SendUsing" not valid.
> Source Error:
>
> Line 4:
> Line 5: Sub Button1_Click(sender As Object, e As EventArgs)
> Line 6: SmtpMail.Send( _
> Line 7: "kenneth.philp@.sverige.nu", _
> Line 8: "kenneth.philp@.sverige.nu", _
> *********************************
> I've checked that smtp services are on
> What does "Sendusing" indicate?
> Cheers.
> Kenneth
Trouble w sending email
Trying to send an email with .net from my home computer.
A very simple one...
***************************
<%@dotnet.itags.org. Page Language="VB" %>
<%@dotnet.itags.org. Import Namespace="System.Web.Mail" %>
<script runat="server"
Sub Button1_Click(sender As Object, e As EventArgs)
SmtpMail.Send( _
"kenneth.philp@dotnet.itags.org.sverige.nu", _
"kenneth.philp@dotnet.itags.org.sverige.nu", _
"Testing mail", _
"Just sending a test message!")
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server" ID="Form1">
<asp:Button id="Button1" onclick="Button1_Click" runat="server"
Text="Button"></asp:Button>
</form>
</body>
</html>
**********************
I'm getting this error message
********************************
Configurationvalue "SendUsing" not valid.
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:
Configurationvalue "SendUsing" not valid.
Source Error:
Line 4:
Line 5: Sub Button1_Click(sender As Object, e As EventArgs)
Line 6: SmtpMail.Send( _
Line 7: "kenneth.philp@dotnet.itags.org.sverige.nu", _
Line 8: "kenneth.philp@dotnet.itags.org.sverige.nu", _
*********************************
I've checked that smtp services are on
What does "Sendusing" indicate?
Cheers.
KennethThe problem might be cos you're not specifying the SMTP server to send
through.
"Kenneth P" <KennethP@.discussions.microsoft.com> wrote in message
news:E07039CF-3FD5-49CD-BF51-EE5BF7A5BFF6@.microsoft.com...
> Hi,
> Trying to send an email with .net from my home computer.
> A very simple one...
> ***************************
> <%@. Page Language="VB" %>
> <%@. Import Namespace="System.Web.Mail" %>
> <script runat="server">
> Sub Button1_Click(sender As Object, e As EventArgs)
> SmtpMail.Send( _
> "kenneth.philp@.sverige.nu", _
> "kenneth.philp@.sverige.nu", _
> "Testing mail", _
> "Just sending a test message!")
> End Sub
> </script>
> <html>
> <head>
> </head>
> <body>
> <form runat="server" ID="Form1">
> <asp:Button id="Button1" onclick="Button1_Click" runat="server"
> Text="Button"></asp:Button>
> </form>
> </body>
> </html>
> **********************
> I'm getting this error message
> ********************************
> Configurationvalue "SendUsing" not valid.
> 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:
> Configurationvalue "SendUsing" not valid.
> Source Error:
>
> Line 4:
> Line 5: Sub Button1_Click(sender As Object, e As EventArgs)
> Line 6: SmtpMail.Send( _
> Line 7: "kenneth.philp@.sverige.nu", _
> Line 8: "kenneth.philp@.sverige.nu", _
> *********************************
> I've checked that smtp services are on
> What does "Sendusing" indicate?
> Cheers.
> Kenneth
Trouble with a page loading when xcopying from localhost to server!
Can you post the html markup?
There is a form tag in the html, but here it is:
Date of Request:Ext.:IS Request #:Originator:Dept Manager:Upload Bulletins
Please select a brandPlease select bulletins to upload for emailing. Note: Uploaded files must be MS Word files. Select Product Bulletin Type
there is a form tag... here is code
It worked locally not on development server..
. Date of Request:Ext.:IS Request #:Originator:Dept Manager:Upload Bulletins
Please select a brandPlease select bulletins to upload for emailing. Note: Uploaded files must be MS Word files. Select Product Bulletin Type
I'm sorry, I meant to post you aspx code for the page. Sorry, I didn't notice that you said you had a <form tag.
You say that another page is working. does it have any server controls on it?
Hey Jim,
Sorry about the double post, I'm new to this forum.. I believe its a sql connection problem. OR not? Here is the code for the connection:
'This will access a SQL database and retreive users name, ext, dept, ID.
Dim cnAsNew SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ProductBulletins;Data Source=SERVER") <-generic server
Dim cmdAs SqlCommand
Dim dr As SqlDataReader
Try
cn.Open()
cmd = New SqlCommand("usp_SELECTBYUSERNAME", cn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@.username", user)
dr = cmd.ExecuteReader(CommandBehavior.SingleRow)
dr.Read()
lblOriginator.Text = dr.Item("FirstName") + " " + dr.Item("LastName")
lblExt.Text = dr.Item("Extension")
lblDeptManager.Text = dr.Item("Department")
userID = dr.Item("ID")
Catch ex As Exception
Response.Redirect("ErrorSuccess.aspx?Err=1" + Context.Server.GetLastError.Message)
Finally
dr.Close()
cn.Close()
EndTry
EndSub