p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: Professional ASP.NET 1.0, Special Edition/1.1
I forgot my password Register Now
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 12th, 2003, 12:05 PM
Registered User
Points: 48, Level: 1
Points: 48, Level: 1 Points: 48, Level: 1 Points: 48, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old September 7th, 2003, 03:58 PM
Authorized User
Points: 257, Level: 5
Points: 257, Level: 5 Points: 257, Level: 5 Points: 257, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old September 7th, 2003, 05:21 PM
Imar's Avatar
Wrox Author
Points: 33,554, Level: 80
Points: 33,554, Level: 80 Points: 33,554, Level: 80 Points: 33,554, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old August 22nd, 2007, 06: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




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old August 26th, 2007, 12:16 PM
Imar's Avatar
Wrox Author
Points: 33,554, Level: 80
Points: 33,554, Level: 80 Points: 33,554, Level: 80 Points: 33,554, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email Code: Error: "SendUsing" invalid misskaos Classic ASP Basics 4 October 4th, 2006 03:25 PM
Configuration error exstream ASP.NET 2.0 Basics 1 May 6th, 2006 01:39 PM
Configuration Error johno BOOK: ASP.NET Website Programming Problem-Design-Solution 6 July 22nd, 2005 11:07 PM
Struggling with Configuration RPG SEARCH ASP.NET 1.0 and 1.1 Basics 3 September 29th, 2004 04:06 AM
CDO.Message error- SendUsing config value dsjackson ASP CDO 0 September 15th, 2004 01:59 PM



All times are GMT -4. The time now is 04:31 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc