@task
def mailserver(ctx, port=1025):
 cmd = 'python -m smtpd -n -c DebuggingServer localhost:{port}'.format(port=port)
 ctx.run(bin_prefix(cmd), pty=True)

@ task def mailserver ( ctx , port = 1025 ) : cmd = 'python -m smtpd -n -c DebuggingServer localhost:{port}' . format ( port = port ) ctx . run ( bin_prefix ( cmd ) , pty = True )
run a smtp test server .