UserFrosting API

SetupSmtpCommand extends BaseCommand

SMTP Setup Wizard CLI Tools.

Helper command to setup SMTP config in .env file.

Tags
author

Alex Weissman (https://alexanderweissman.com)

Table of Contents

Setup_SMTP 'SMTP Server'
Setup_Gmail 'Gmail'
Setup_None 'No email support'
$envPath string
$io SymfonyStyle
$ci ContainerInterface
configure() {@inheritdoc} mixed
execute() {@inheritdoc} mixed
askForSmtpMethod() Ask with setup method to use. array
askForSmtp() Ask for SMTP credential. array
askForGmail() Ask for Gmail. array
askForNone() Process the "no email support" setup option. array
isSmtpConfigured() Check if the app/.env SMTP portion is defined or not. bool
initialize() {@inheritdoc} mixed
setContainer() Setup the global container object. void
isProduction() Return if the app is in production mode. bool

Constants

Properties

Methods

configure()

{@inheritdoc}

protected configure( ) : mixed
Return values
mixed

execute()

{@inheritdoc}

protected execute( $input : InputInterface , $output : OutputInterface ) : mixed
Parameters
$input : InputInterface
$output : OutputInterface
Return values
mixed

askForSmtpMethod()

Ask with setup method to use.

protected askForSmtpMethod( $input : InputInterface ) : array
Parameters
$input : InputInterface
Return values
array

The SMTP connection info

askForSmtp()

Ask for SMTP credential.

protected askForSmtp( $input : InputInterface ) : array
Parameters
$input : InputInterface

Command arguments

Return values
array

The SMTP connection info

askForGmail()

Ask for Gmail.

protected askForGmail( $input : InputInterface ) : array
Parameters
$input : InputInterface

Command arguments

Return values
array

The SMTP connection info

askForNone()

Process the "no email support" setup option.

protected askForNone( $input : InputInterface ) : array
Parameters
$input : InputInterface
Return values
array

The SMTP connection info

isSmtpConfigured()

Check if the app/.env SMTP portion is defined or not.

protected isSmtpConfigured( $dotenvEditor : DotenvEditor ) : bool
Parameters
$dotenvEditor : DotenvEditor
Return values
bool

true if SMTP is configured in .env file

initialize()

{@inheritdoc}

protected initialize( $input : InputInterface , $output : OutputInterface ) : mixed
Parameters
$input : InputInterface
$output : OutputInterface
Return values
mixed

setContainer()

Setup the global container object.

public setContainer( $ci : ContainerInterface ) : void
Parameters
$ci : ContainerInterface

isProduction()

Return if the app is in production mode.

protected isProduction( ) : bool

@return bool True/False if the app is in production mode

Return values
bool

Search results