开发者

How to send Email through ASP.net using localhost

开发者 https://www.devze.com 2023-01-30 03:09 出处:网络
I am creating a banking application in asp.net v 2.0.I need to send confirmation email when a user creates the new account.

I am creating a banking application in asp.net v 2.0.I need to send confirmation email when a user creates the new account.

I am running the application in localhost.DO I need any special rights to send SMTP email?

provide me 开发者_开发问答a proper way to send email from my application.

Regards Jeyaganesh


Do you have a SMTP server set up on localhost? Test by using telnet on the server:

telnet 127.0.0.1 25

If the server responds, try sending raw SMTP commands to send an email and trouble-shoot from there.

I find the easiest way with the Microsoft SMTP server is to disable any checks for authentication and rely on relay restrictions, then restrict relaying to 127.0.0.1.


The fact that you're running on localhost shouldn't make any difference.

As long as you have valid email server settings, and it's allowed on the system you are running on, this works just fine.

Did you try it? Did you have a problem?


I think you can sent by gmail smtp server. check this out

http://csharpdotnetfreak.blogspot.com/2009/08/send-email-using-gmail-in-aspnet.html

0

精彩评论

暂无评论...
验证码 换一张
取 消