473,385 Members | 1,356 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,385 software developers and data experts.

Sending email

I am learning ASP.NET from the book, "ASP.NET for Dummies". An example for
sending email using SMTP fails on my PC. What does this error mean and how
to fix it.

I am running Windows XP and I have Outlook Express which I assume has
installed SMTP in order to work.

The error screen is:
__________________________________________________ ____________________
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 13: "important about this message at all."
Line 14:
Line 15: SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
Line 16: %>
Line 17: </body>

__________________________________________________ ____

This is the code example:

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<html>
<body>
<%
Dim EMailTo As String = "br**@edgequest.com"
Dim EMailFrom As String = "bi**@edgequest.com"
Dim EMailSubject As String = "Important message!"
Dim EmailBody As String

EmailBody = "Thanks for reading this message. " & _
"But I must admit, I lied. There's nothing " & _
"important about this message at all."

SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
%>
</body>
</html>
Nov 18 '05 #1
7 1594
Outlook is not a SMTP server.
Use your ISP's SMTP server to send e-mail and it should work.
A
"flowergardener" <ng***@optonline.net> wrote in message
news:C7**********************@news4.srv.hcvlny.cv. net...
I am learning ASP.NET from the book, "ASP.NET for Dummies". An example for
sending email using SMTP fails on my PC. What does this error mean and how
to fix it.

I am running Windows XP and I have Outlook Express which I assume has
installed SMTP in order to work.

The error screen is:
__________________________________________________ ____________________
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 13: "important about this message at all."
Line 14:
Line 15: SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
Line 16: %>
Line 17: </body>

__________________________________________________ ____

This is the code example:

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<html>
<body>
<%
Dim EMailTo As String = "br**@edgequest.com"
Dim EMailFrom As String = "bi**@edgequest.com"
Dim EMailSubject As String = "Important message!"
Dim EmailBody As String

EmailBody = "Thanks for reading this message. " & _
"But I must admit, I lied. There's nothing " & _
"important about this message at all."

SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
%>
</body>
</html>

Nov 18 '05 #2
JPL
Outlook Express can send mail messages via SMTP, but it is
not the same as an SMTP server.

Given that you have not set the SmtpServer property of the
SmtpMail object, it will fail as it will attempt to use
the local host.

You can install the SMTP server through add/remove
programs (Windows Components) on Win2K/WinXP/Win2003.

Kind Regards,
JPL
-----Original Message-----
I am learning ASP.NET from the book, "ASP.NET for Dummies". An example forsending email using SMTP fails on my PC. What does this error mean and howto fix it.

I am running Windows XP and I have Outlook Express which I assume hasinstalled SMTP in order to work.

The error screen is:
_________________________________________________ _________ ____________Description: An unhandled exception occurred during the execution of thecurrent web request. Please review the stack trace for more informationabout the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The"SendUsing" configuration value is invalid.

Source Error:

Line 13: "important about this message at all."
Line 14:
Line 15: SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)Line 16: %>
Line 17: </body>

_________________________________________________ _____

This is the code example:

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<html>
<body>
<%
Dim EMailTo As String = "br**@edgequest.com"
Dim EMailFrom As String = "bi**@edgequest.com"
Dim EMailSubject As String = "Important message!"
Dim EmailBody As String

EmailBody = "Thanks for reading this message. " & _
"But I must admit, I lied. There's nothing " & _
"important about this message at all."

SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
%>
</body>
</html>
.

Nov 18 '05 #3
Hi,

Check out the following articles about Email and ASP.NET

http://www.developer.com/net/asp/article.php/3096831
http://www.developer.com/net/asp/article.php/3287361

The code samples in the above articles assumes that you
have a real server. You will get free ASP.NET server a/c
from europe.webmatrixhosting.net
--
Regards,
Anand N
Microsoft MVP
www.learnXpress.com
www.learnXpress.com/forums
www.dotnetalbum.com

"flowergardener" <ng***@optonline.net> wrote in message
news:C7**********************@news4.srv.hcvlny.cv. net...
I am learning ASP.NET from the book, "ASP.NET for Dummies". An example for
sending email using SMTP fails on my PC. What does this error mean and how
to fix it.

I am running Windows XP and I have Outlook Express which I assume has
installed SMTP in order to work.

The error screen is:
__________________________________________________ ____________________
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 13: "important about this message at all."
Line 14:
Line 15: SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
Line 16: %>
Line 17: </body>

__________________________________________________ ____

This is the code example:

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<html>
<body>
<%
Dim EMailTo As String = "br**@edgequest.com"
Dim EMailFrom As String = "bi**@edgequest.com"
Dim EMailSubject As String = "Important message!"
Dim EmailBody As String

EmailBody = "Thanks for reading this message. " & _
"But I must admit, I lied. There's nothing " & _
"important about this message at all."

SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
%>
</body>
</html>

Nov 18 '05 #4
check out www.systemwebmail.com for some great explanations, etc.

-th

"flowergardener" <ng***@optonline.net> wrote in message
news:C7**********************@news4.srv.hcvlny.cv. net...
I am learning ASP.NET from the book, "ASP.NET for Dummies". An example for
sending email using SMTP fails on my PC. What does this error mean and how
to fix it.

I am running Windows XP and I have Outlook Express which I assume has
installed SMTP in order to work.

The error screen is:
__________________________________________________ ____________________
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 13: "important about this message at all."
Line 14:
Line 15: SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
Line 16: %>
Line 17: </body>

__________________________________________________ ____

This is the code example:

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<html>
<body>
<%
Dim EMailTo As String = "br**@edgequest.com"
Dim EMailFrom As String = "bi**@edgequest.com"
Dim EMailSubject As String = "Important message!"
Dim EmailBody As String

EmailBody = "Thanks for reading this message. " & _
"But I must admit, I lied. There's nothing " & _
"important about this message at all."

SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
%>
</body>
</html>

Nov 18 '05 #5
Which title in the Components menu is the SMTP server? I don't see anything
entry that specifically says SMTP. I have everything installed except for:
Fax Services
Message Queuing
Universal Plug and Play
Other Network File and Print Services
Windows Messenger

If the server is installed, how do I set the SmtpServer property? Where
would I find it?
"JPL" <jp*****@hotmail.com> wrote in message
news:08****************************@phx.gbl...
Outlook Express can send mail messages via SMTP, but it is
not the same as an SMTP server.

Given that you have not set the SmtpServer property of the
SmtpMail object, it will fail as it will attempt to use
the local host.

You can install the SMTP server through add/remove
programs (Windows Components) on Win2K/WinXP/Win2003.

Kind Regards,
JPL
-----Original Message-----
I am learning ASP.NET from the book, "ASP.NET for

Dummies". An example for
sending email using SMTP fails on my PC. What does this

error mean and how
to fix it.

I am running Windows XP and I have Outlook Express which

I assume has
installed SMTP in order to work.

The error screen is:
_________________________________________________ _________

____________
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 13: "important about this message at all."
Line 14:
Line 15: SmtpMail.Send(EMailFrom, EMailTo, EMailSubject,

EMailBody)
Line 16: %>
Line 17: </body>

_________________________________________________ _____

This is the code example:

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<html>
<body>
<%
Dim EMailTo As String = "br**@edgequest.com"
Dim EMailFrom As String = "bi**@edgequest.com"
Dim EMailSubject As String = "Important message!"
Dim EmailBody As String

EmailBody = "Thanks for reading this message. " & _
"But I must admit, I lied. There's nothing " & _
"important about this message at all."

SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
%>
</body>
</html>
.

Nov 18 '05 #6
I don't understand how to do that. What statements do I put into my code
example to reach my ISP's SMTP server?
"Andrew de la Harpe" <an*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Outlook is not a SMTP server.
Use your ISP's SMTP server to send e-mail and it should work.
A
"flowergardener" <ng***@optonline.net> wrote in message
news:C7**********************@news4.srv.hcvlny.cv. net...
I am learning ASP.NET from the book, "ASP.NET for Dummies". An example for sending email using SMTP fails on my PC. What does this error mean and how to fix it.

I am running Windows XP and I have Outlook Express which I assume has
installed SMTP in order to work.

The error screen is:
__________________________________________________ ____________________
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 13: "important about this message at all."
Line 14:
Line 15: SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
Line 16: %>
Line 17: </body>

__________________________________________________ ____

This is the code example:

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<html>
<body>
<%
Dim EMailTo As String = "br**@edgequest.com"
Dim EMailFrom As String = "bi**@edgequest.com"
Dim EMailSubject As String = "Important message!"
Dim EmailBody As String

EmailBody = "Thanks for reading this message. " & _
"But I must admit, I lied. There's nothing " & _
"important about this message at all."

SmtpMail.Send(EMailFrom, EMailTo, EMailSubject, EMailBody)
%>
</body>
</html>


Nov 18 '05 #7
Thanks to all for your helpful instructions. By adding two lines to my
example, I got it working. I needed the server object and the address of my
ISP.

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@Import Namespace="System.Web.Mail" %>
<html>
<body>
<%
Dim aEmail As New System.Web.Mail.MailMessage
Dim aMessage As System.Web.Mail.SmtpMail
Dim aEMailTo As String = "te**@optonline.net"
Dim aEMailFrom As String = "ng***@optonline.net"
Dim aEMailSubject As String = "Important message!"
Dim aEmailBody As String

aMessage.SmtpServer = "mail.optonline.net"

aEmailBody = "Thanks for reading this message. " & _
"But I must admit, I lied. There's nothing " & _
"important about this message at all."

SmtpMail.Send(aEMailFrom, aEMailTo, aEMailSubject,

aEMailBody)
%>
</body>
</html>
Nov 18 '05 #8

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

Similar topics

3
by: Paul Lamonby | last post by:
Hi, I am sending a file from the server as an email attachment. The file is being attached no problem and sending the email, but I get an error when I try to open it saying it is corrupt....
0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
by: =?Utf-8?B?QWRl?= | last post by:
HI All, I am encountering the following error when I try to send an email through a SMTP server. I believe the problem lies with the authentication part when the network crednetials are used,...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
7
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
31
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.