@run.command()
@click.option('--bind', '-b', default=None, help='Bind address.', type=Address)
@click.option('--upgrade', default=False, is_flag=True, help='Upgrade before starting.')
@click.option('--noinput', default=False, is_flag=True, help='Do not prompt the user for input of any kind.')
@configuration
def smtp(bind, upgrade, noinput):
 if upgrade:
  click.echo('Performing upgrade before service startup...')
  from sentry.runner import call_command
  call_command('sentry.runner.commands.upgrade.upgrade', verbosity=0, noinput=noinput)
 from sentry.services.smtp import SentrySMTPServer
 SentrySMTPServer(host=bind[0], port=bind[1]).run()

@ run . command ( ) @ click . option ( '--bind' , '-b' , default = None , help = 'Bind address.' , type = Address ) @ click . option ( '--upgrade' , default = False , is_flag = True , help = 'Upgrade before starting.' ) @ click . option ( '--noinput' , default = False , is_flag = True , help = 'Do not prompt the user for input of any kind.' ) @ configuration def smtp ( bind , upgrade , noinput ) : if upgrade : click . echo ( 'Performing upgrade before service startup...' ) from sentry . runner import call_command call_command ( 'sentry.runner.commands.upgrade.upgrade' , verbosity = 0 , noinput = noinput ) from sentry . services . smtp import SentrySMTPServer SentrySMTPServer ( host = bind [ 0 ] , port = bind [ 1 ] ) . run ( )
run inbound email service .