PDA

View Full Version : Has anyone had luck sending email from the Sandbox? With membership functions forgot password?


CSVChicago
08-21-2005, 01:18 AM
I'm working with the new Membership functions, specifically the 'forgot password' function that is supposed to send an email to the user with their password, but it's ahving trouble.

It generates this error message:
================================================== ==========
The SMTP host was not specified.
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.InvalidOperationException: The SMTP host was not specified.
================================================== ==========

I tried adding a section to the web.config that says:

<system.web>
<smtpMail serverName='localhost' serverPort='25' />
<system.web>

But then I get the standard error message that says 'You need to add a 'customerrors=off' thingy - so my guess is my attempt to override something in the machine.config is going blammo because of how the server security is setup, or I'm not entering the line correctly in the web.config?

It does look like VWD Express Beta is flagging that line in the web.config and saying that <SmtpMail> is not a valid item in the web.config.

Has anyone got anything to email at all form the sandbox? And if so any luck with the 'forgot password' function?

Thanks,

-Walter

wengert
09-08-2005, 01:39 AM
I too have been trying to send email from an asp.net 2.0 page without any luck (see my post regarding that). I have tried setting the MailClient.Host to "localhost", "smtpout.secureserver.net", and "smtp.comcast.net" (my local ISP), none of which work. I do not get any errors but nothing is being sent.


If anyone knows how to make this work please post the proper steps.


------------
Wayne

bruce
09-09-2005, 12:35 AM
i checked the email log, and it seems like email are being delivered.

this may help, http://kb.discountasp.net/article.aspx?id=10185

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

wengert
09-09-2005, 12:49 AM
See myreply in the "Mail Server to Use" post. I finally got it to work.


------------
Wayne

CSVChicago
09-10-2005, 05:32 AM
Hi All,

We do have it working now. It turns out MS created a whole new section in the Web.Config file for this and just forgot to tell anybody about it. (well actually- 95% of the examples out there just show the old way that doesn't work anymore - you can find documentation if you know what to look for)

Try adding this to web.config:

<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network
defaultCredentials="True"
host="LocalHost"
port="25"
from="yournamehere@yourdomainhere.com"
/>
</smtp>
</mailSettings>
</system.net>

<!--handy option during testing - doesnt send emails - just writes them in a directory-->
<!--smtp deliveryMethod="SpecifiedPickupDirectory"-->


-Walter

wengert
09-10-2005, 06:59 AM
Thanks for sharing that. Very useful information. Where did you find that documented?

Wayne


------------
Wayne

CSVChicago
09-10-2005, 07:28 AM
I've been on so many sites lately-- I forget where I saw that one...

But I'm pretty sure that's when I figured out to use "BETA 2" in the Google searches and it was on a page like "What's new in Beta 2" or something like that.