Wrox Programmer Forums
|
BOOK: Professional ASP.NET 1.0, Special Edition/1.1
This is the forum to discuss the Wrox book Professional ASP.NET 1.1 by Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson; ISBN: 9780764558900
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 1.0, Special Edition/1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 12th, 2003, 11:05 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default The "SendUsing" configuration value is invalid

Hi,

I have been developing a site and have set up a form to email:

System.Web.Mail.MailMessage message = new System.Web.Mail.MailMessage();
            message.From = from;
            message.To = to;
            message.Subject = subject;
            message.Body = body;
            message.BodyFormat = System.Web.Mail.MailFormat.Html;

            System.Web.Mail.SmtpMail.Send(message);

This works fine on my local machine but I cannot get the email sent on the server - Here is the error message I'm getting:

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.

[COMException (0x80040220): The "SendUsing" configuration value is invalid.
]

Anyone have any ideas?

Thanks in advance

Jay
 
Old September 7th, 2003, 02:58 PM
Authorized User
 
Join Date: Jun 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to erobb Send a message via Yahoo to erobb
Default


Does mail sent through the server need CDO authentication?
 
Old September 7th, 2003, 04:21 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You may need to set the SMTP server explicitly. I believe it defaults to localhost (that's why it works on your local machine). Apparently, the server your page runs on does not have an SMTP server installed, so it can't send the mail using localhost.

Try this:
Code:
SmtpMail.SmtpServer = "smtp.YourProvider.com";
SmtpMail.Send(objMail);
or in your case since you're not using a using statement (no pun intended):
Code:
System.Web.Mail.SmtpMail.SmtpServer = "smtp.YourProvider.com";
System.Web.Mail.SmtpMail.Send(objMail);
This will force the ASP page to send the e-mail to the smtp.YourProvider.com server.

HtH,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old August 22nd, 2007, 05:11 AM
Registered User
 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi ally

i also got above that type of 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.


I tried below type of coding , but not use

SmtpMail.SmtpServer = "smtp.YourProvider.com";
SmtpMail.Send(objMail);

(or)

SmtpMail.SmtpServer = "IP address";
SmtpMail.Send(objMail);

(or)

SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(objMail);

(or)

SmtpMail.SmtpServer = "the_machine_name";
SmtpMail.Send(objMail);

nothing happen

not use above coding

give some others solution

10x in @vance




 
Old August 26th, 2007, 11:16 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I don't want to be funny, but did you replace smtp.YourProvider.com with an actual valid SMTP server provided by your ISP??

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old January 4th, 2010, 03:39 AM
Registered User
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy I am getting the Run-Time error - The "SendUsing" configuration value is invalid

Sub Email()


Set objmessage = CreateObject("CDO.Message")
'SmtpMail.SmtpServer = "smtpserver name"
objmessage.Subject = "Subject"
objmessage.From = "[email protected]"
objmessage.To = "[email protected]"
objmessage.TextBody = "Excel Data is sent successfully."
objmessage.Send

End Sub


Please let me know if you know any solution...Its urgent





Similar Threads
Thread Thread Starter Forum Replies Last Post
Email Code: Error: "SendUsing" invalid misskaos Classic ASP Basics 7 October 25th, 2010 03:16 AM
Configuration error exstream ASP.NET 2.0 Basics 1 May 6th, 2006 12:39 PM
Configuration Error johno BOOK: ASP.NET Website Programming Problem-Design-Solution 6 July 22nd, 2005 10:07 PM
Struggling with Configuration RPG SEARCH ASP.NET 1.0 and 1.1 Basics 3 September 29th, 2004 03:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.