Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: Professional ASP.NET 1.0, Special Edition/1.1
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 12th, 2003, 11:05 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old September 7th, 2003, 02:58 PM
Authorized User
 
Join Date: Jun 2003
Location: Richmond, VA, USA.
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?
Reply With Quote
  #3 (permalink)  
Old September 7th, 2003, 04:21 PM
Imar's Avatar
Wrox Author
Points: 65,660, Level: 100
Points: 65,660, Level: 100 Points: 65,660, Level: 100 Points: 65,660, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 15,962
Thanks: 64
Thanked 1,349 Times in 1,329 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.
Reply With Quote
  #4 (permalink)  
Old August 22nd, 2007, 05:11 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
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




Reply With Quote
  #5 (permalink)  
Old August 26th, 2007, 11:16 AM
Imar's Avatar
Wrox Author
Points: 65,660, Level: 100
Points: 65,660, Level: 100 Points: 65,660, Level: 100 Points: 65,660, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 15,962
Thanks: 64
Thanked 1,349 Times in 1,329 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
Reply With Quote
  #6 (permalink)  
Old January 4th, 2010, 02: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 = "xyz@domain.com"
objmessage.To = "xyz@domain.com"
objmessage.TextBody = "Excel Data is sent successfully."
objmessage.Send

End Sub


Please let me know if you know any solution...Its urgent
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 02:58 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.