wp_mail_smtp()->assets_url . '/images/providers/google.svg', 'slug' => self::SLUG, 'title' => esc_html__( 'Gmail', 'wp-mail-smtp' ), 'description' => sprintf( wp_kses( /* translators: %s - URL to our Gmail doc. */ __( 'Send emails using your Gmail or G Suite (formerly Google Apps) account, all while keeping your login credentials safe. Other Google SMTP methods require enabling less secure apps in your account and entering your password. However, this integration uses the Google API to improve email delivery issues while keeping your site secure.

Read our Gmail documentation to learn how to configure Gmail or G Suite.', 'wp-mail-smtp' ), [ 'br' => [], 'a' => [ 'href' => [], 'rel' => [], 'target' => [], ], ] ), 'https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/' ), 'notices' => [ 'educational' => esc_html__( 'The Gmail mailer works well for sites that send low numbers of emails. However, Gmail\'s API has rate limitations and a number of additional restrictions that can lead to challenges during setup. If you expect to send a high volume of emails, or if you find that your web host is not compatible with the Gmail API restrictions, then we recommend considering a different mailer option.', 'wp-mail-smtp' ), ], 'php' => '5.5', 'supports' => [ 'from_email' => true, 'from_name' => true, 'return_path' => false, 'from_email_force' => true, 'from_name_force' => true, ], ] ); } /** * @inheritdoc */ public function display_options() { // Do not display options if PHP version is not correct. if ( ! $this->is_php_correct() ) { $this->display_php_warning(); return; } ?>
options->is_const_defined( $this->get_slug(), 'client_id' ) ? 'disabled' : ''; ?> id="wp-mail-smtp-setting-get_slug() ); ?>-client_id" spellcheck="false" />
options->is_const_defined( $this->get_slug(), 'client_secret' ) ) : ?> display_const_set_message( 'WPMS_GMAIL_CLIENT_SECRET' ); ?>

display_auth_setting_action(); ?>
process_provider_remove(); $auth = new Auth(); ?> is_clients_saved() ) : ?> is_auth_required() ) : ?>

get_user_info(); if ( ! empty( $user['email'] ) ) { printf( /* translators: %s - email address, as received from Google API. */ esc_html__( 'Connected as %s', 'wp-mail-smtp' ), '' . esc_html( $user['email'] ) . '' ); } ?>

Follow these instructions and then select the From Email at the top of this page.', 'wp-mail-smtp' ), [ 'a' => [ 'href' => [], 'rel' => [], 'target' => [], ], ] ), 'https://support.google.com/a/answer/33327' ); ?>

get( 'mail', 'mailer' ) !== $this->get_slug() ) { return; } $old_opt = $options->get_all_raw(); foreach ( $old_opt[ $this->get_slug() ] as $key => $value ) { // Unset everything except Client ID and Secret. if ( ! in_array( $key, array( 'client_id', 'client_secret' ), true ) ) { unset( $old_opt[ $this->get_slug() ][ $key ] ); } } $options->set( $old_opt ); } }