Starting and Stopping SMTP on Dev Server: Difference between revisions
Jump to navigation
Jump to search
| Line 17: | Line 17: | ||
=== Development web server settings === | === Development web server settings === | ||
* '''Remote Desktop''' to local dev web server. | |||
* Start the '''SMTP service'''. | |||
* Start the '''SMTP Virtual Server'''. | |||
==== Command line ==== | ==== Command line ==== | ||
Using PowerShell as Administrator: | Using PowerShell as Administrator: | ||
| Line 23: | Line 29: | ||
<syntaxhighlight lang="powershell"> | <syntaxhighlight lang="powershell"> | ||
> net start | > net start smtpsvc | ||
</syntaxhighlight> | </syntaxhighlight> | ||
or | |||
<syntaxhighlight lang="powershell"> | <syntaxhighlight lang="powershell"> | ||
> net start | > net start "Simple Mail Transfer Protocol (SMTP)" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 42: | Line 48: | ||
==== Management consoles ==== | ==== Management consoles ==== | ||
* Administrative Tools > Services > Simple Mail Transport Protocol > Start | * Administrative Tools > Services > Simple Mail Transport Protocol > Start | ||
* Administrative Tools > IIS 6.0 Manager | * Administrative Tools > IIS 6.0 Manager | ||
Revision as of 17:18, 15 August 2013
Starting SMTP
Server-side code
Make sure the code is using the development SMTP server
e.g. in Web.config:
<configuration> <appSettings> <add key="SMTPServer" value="devserver"/> </appSettings> </configuration>
Router settings
This is only necessary if the SMTP server is being reached remotely. If the STMP server referenced as part of the LAN then port 25 on the router can remain disabled.
- Log into (medialink) router: http://192.168.123.1
- Click ‘Virtual Server’ option
- Enable port 25 (pointing to the local dev web server)
Development web server settings
- Remote Desktop to local dev web server.
- Start the SMTP service.
- Start the SMTP Virtual Server.
Command line
Using PowerShell as Administrator:
Start the SMTP service:
> net start smtpsvc
or
> net start "Simple Mail Transfer Protocol (SMTP)"
Start the SMTP server:
> $SMTP=[adsi]"IIS://localhost/SMTPSVC/1" > $SMTP.ServerState = 2 > $SMTP.SetInfo()
Management consoles
- Administrative Tools > Services > Simple Mail Transport Protocol > Start
- Administrative Tools > IIS 6.0 Manager
- SMTP Server > right click > Start
- SMTP Server > right click > Properties
- Access tab > Relay Restrictions > Relay...
- Select 'Only the list below'
- Click 'Add...'
- Select 'Group of computers'
- Subnet address: first IP address in group, e.g. 192.168.123.100
- Subnet mask: wide enough to allow access for all computers in group, e.g. 255.255.255.200
Stopping SMTP
Stop SMTP Server
- Remote Desktop to machine running SMTP Server
- Administrative Tools > IIS 6.0 Manager > SMTP Virtual Server > right click > Stop
- (Optionally) Administrative Tools > Services > Simple Mail Transport Protocol > Stop
Router
This step is necessary only if the SMTP server address is off the LAN.
- (medialink) http://192.168.123.1
- Virtual Server > disable port 25 (SMTP)