[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Sending an Email From LocalHost

Posted on 2009-06-30
16
Medium Priority
?
316 Views
Last Modified: 2012-05-07
Is there anyway to send a email from your application using localhost. I tried this, but doesnt work.
<system.net>
      <mailSettings>
        <smtp deliveryMethod="Network">
          <network host="localhost" port="25" />
        </smtp>
      </mailSettings>
    </system.net>

Open in new window

0
Comment
Question by:npl77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
16 Comments
 
LVL 7

Expert Comment

by:urir10
ID: 24749110
0
 

Author Comment

by:npl77
ID: 24749445
I did that....
Im getting this exception
No connection could be made because the target machine actively refused it 127.0.0.1:25
0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 24752787
Hi npl

If you've installed the SMTP service on your machine but it is not fully working then you could try following the steps listed on this site: http://thedaneshproject.com/posts/send-mail-through-smtp-using-telnet/

This will enable you to identify the specific problem that your SMTP service is having.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:npl77
ID: 24755204
Where do I "key in" this stuff. Can you expand on exactly what to do in the steps from the url posted. I dont know what it means to...

Telnet to the server via port 25.    <------How do you do this?

1. Key in EHLO example.com and hit enter.        <------How do you do this?
0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 24755670
Hi again

It would help to know what operating system is the server running on?

Basically you need to run TELNET from the command line, so you'd click Start->Run and enter CMD to bring up a command prompt, then you'd enter TELNET localhost 25

Assuming you have TELNET installed, you'll then connect to the service that is listening on the TCP/IP port 25 (which will be your SMTP server)
If however TELNET is not installed and you get an "unknown command or filename" type message, you'll need to first install it by going in to Control Panel and Add/Remove Programs (Programs and Features in Windows Server 2008 or Vista) and then "turn windows features on or off" and then add TELNET from the options you see there.
Basically TELNET lets you talk directly to the SMTP service without the nice GUI interface that a normal e-mail client would give you, and lets you type in raw email commands and see extactly what messages and errors your mail server is returning.
0
 

Author Comment

by:npl77
ID: 24758548
I am using my laptop Vista Home OS. I just installed TELENET but its saying it cannot open a connection on port 25
0
 

Author Comment

by:npl77
ID: 24758558
I download both the client and server for telenet
0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 24761303
Do you have Windows Firewall enabled?  If so, you'll need to either disable it or to allow SMTP traffic to your SMTP server on port 25.

Please click Start->Control Panel->Windows Firewall.  Does it say that the firewall is on or off?

If it is on, click "Allow a program through Windows Firewall".  From the Exceptions tab, scroll down and you should see SMTP.  Check the box and click OK.  Then retry the TELNET test.
0
 

Author Comment

by:npl77
ID: 24767275
i do not have the windows firewall on and it still doesnt work
0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 24767620
If it is saying that it cannot open a connection, it sounds like your SMTP server is not correctly installed.  Can you tell me the steps you took to install and configure the SMTP service?
0
 

Author Comment

by:npl77
ID: 24769469
Went to Windows features and checked TELNET client and TELNET server then they installed successfully and after that I got rid of the "unknown error" when typing TELNET localhost 25 in the command prompt. After that I made sure my firewall was off and it was.
0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 24770626
No - that is how you installed the TELNET program.  How did you install the SMTP service (the mail server)??
0
 

Author Comment

by:npl77
ID: 24772879
I didnt maybe. How do you do it?
0
 
LVL 12

Accepted Solution

by:
Hairbrush earned 2000 total points
ID: 24772988
Well, that turns out to be a bit of a trick question of mine, because it turns out that there is no SMTP service in Vista.  You will need to install one from a third-party.

You could try the free one at http://softstack.com/freesmtp.html

0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 24773013
By the way, the reason I thought you had already installed an SMTP server when Uri sent you a link to instructions on how to install the SMTP server (on Windows Server) you replied "I did that...."
0
 

Author Comment

by:npl77
ID: 24773365
Ok I installed that and tried again still the same error. Do I have to do something besides simply installing the free SMTP?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question