Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 17, 2009 04:01 PM by RaeKC
Dec 10, 2008 04:52 AM|LINK
I've tried running the program to recover a password and it says the password has been sent but it never is when I check the various email accounts I've tried as a fictional user.
Is there some code snippet I need to insert somewhere for the project to send e-mail? I've got my IIS relay set to 127.0.0.1. That doesn't seem to help.
Dec 10, 2008 06:26 AM|LINK
Refer following URL's :
Dec 10, 2008 02:07 PM|LINK
Its always great to see a sample project. Hopefully it will give me an idea what to do with the beerhouse project.
I'm surprised that if there is a simple solution in those samples, that it isn't included in the beerhouse project?
Dec 10, 2008 02:18 PM|LINK
Don't worry, full email functionality is implemented in TheBeerHouse.
There is a section in web.config that looks something like this:
<smtp deliveryMethod="PickupDirectoryFromIis" from="email@example.com">
<network defaultCredentials="true" host="(localhost)" port="25"/>
You just need to configure your local IIS SMTP mail server to send mail.One of the examples above may help you on that.
You may also have to set from= to a real mail address, and depending on your ISP, you may have to use port 587 instead of 25.
Dec 11, 2008 07:47 PM|LINK
I read on another forum, that being unable to send the email sometimes only happens in developement stage and that once its actually published to a host, it works. Could that be the case here since I haven't published this to a server? I was going to use
some host that was cheap, maybe godaddy.
Dec 11, 2008 07:55 PM|LINK
You only need to configure your local IIS SMTP if you want to test email sending locally, without publishing to a production server first.
Once it's hosted, then whatever you have on your local server won't matter.
Dec 11, 2008 07:56 PM|LINK
By the way, if you want to test it locally and still don't want to mess with IIS, you can easily configure a gmail account to send your mail from your local application. A lot of people do this; it's pretty convenient.
Dec 11, 2008 08:27 PM|LINK
Someone else told me about gmail so I set up an email account there but just putting that address in the code alone didn't work. Is this configuration something I do on Gmail? I guess I didn't do it right. Do you know a link that shows how to do that?
Dec 11, 2008 09:20 PM|LINK
<network host="smtp.gmail.com" password="your_gmail_password" port="587" userName="firstname.lastname@example.org"/>
You will also have to set the mail client up to use SSL in whatever code you use to send mail.
In a built-in control, you do that by handling the SendingMail event.
For example, for CreateUserWizard control:
protected void CreateUserWizard1_SendingMail(object sender, MailMessageEventArgs e)
SmtpClient smtpClient = new SmtpClient();
smtpClient.EnableSsl = true;
e.Cancel = true;
Dec 11, 2008 11:33 PM|LINK
I finally got it to work. Thanks! [:)]
I had to use port 25 tho. The other gave me a rejection.. something about actively rejecting it.