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.
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.
Apparently I don't have my local IIS SMTP mail server configured correctly to send email. Would I still have to do that once it was published to a web host?
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.
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?
RaeKC
Member
101 Points
366 Posts
any code snippet to allow the e-mail to be sent from beerhouse project?
Dec 10, 2008 04:52 AM|LINK
Hello;
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.
Rachel
SATISD9X
Contributor
2713 Points
487 Posts
Re: any code snippet to allow the e-mail to be sent from beerhouse project?
Dec 10, 2008 06:26 AM|LINK
Refer following URL's :
http://www.developer.com/net/asp/article.php/3096831
http://www.systemwebmail.com/faq/5.2.2.aspx
http://www.codeproject.com/KB/aspnet/EmailApplication.aspx
MCTS .Net Framework 2.0 Web Applications
Web Developer 3.5
~ Please Mark as Answer if it solves your query ~
RaeKC
Member
101 Points
366 Posts
Re: any code snippet to allow the e-mail to be sent from beerhouse project?
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?
Rae
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: any code snippet to allow the e-mail to be sent from 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:
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.
Follow Me on Twitter
RaeKC
Member
101 Points
366 Posts
Re: any code snippet to allow the e-mail to be sent from beerhouse project?
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.
Apparently I don't have my local IIS SMTP mail server configured correctly to send email. Would I still have to do that once it was published to a web host?Rae
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: any code snippet to allow the e-mail to be sent from beerhouse project?
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.
Follow Me on Twitter
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: any code snippet to allow the e-mail to be sent from beerhouse project?
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.
Follow Me on Twitter
RaeKC
Member
101 Points
366 Posts
Re: any code snippet to allow the e-mail to be sent from beerhouse project?
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?
Rae
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: any code snippet to allow the e-mail to be sent from beerhouse project?
Dec 11, 2008 09:20 PM|LINK
<system.net> <mailSettings> <smtp from=your_gmail_email@gmail.com> <network host="smtp.gmail.com" password="your_gmail_password" port="587" userName="your_gmail_email@gmail.com"/> </smtp> </mailSettings> </system.net>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:
Follow Me on Twitter
RaeKC
Member
101 Points
366 Posts
Re: any code snippet to allow the e-mail to be sent from beerhouse project?
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.
Rae