Diferencia entre revisiones de «SIU-Guarani/Version3.19.0/envio-email-gmail-xoauth2»
m |
m |
||
Línea 9: | Línea 9: | ||
== [[#generar-refresh-token|2. Generar Refresh Token]] == | == [[#generar-refresh-token|2. Generar Refresh Token]] == | ||
− | En '''SIU-Guaraní Gestión''' editar el archivo '''instalacion/toba.conf''' agregando la siguiente entrada: | + | 2.1) En '''SIU-Guaraní Gestión''' editar el archivo '''vendor/phpmailer/phpmailer/get_oauth_token.php'''configurando las variables '''$clientId''' y '''$clientSecret''' con las credenciales generadas en el [#obtener-credenciales-XOAUTH2 paso 1]. |
+ | |||
+ | 2.2) En '''SIU-Guaraní Gestión''' editar el archivo '''instalacion/toba.conf''' agregando la siguiente entrada: | ||
<source lang="apache" enclose="div"> | <source lang="apache" enclose="div"> | ||
#Configuración de Gmail vía XOAUTH2 | #Configuración de Gmail vía XOAUTH2 | ||
Línea 36: | Línea 38: | ||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[SIU-Guarani/Version3.19.0/consideraciones_tecnicas|< Volver]] | [[SIU-Guarani/Version3.19.0/consideraciones_tecnicas|< Volver]] |
Revisión del 12:59 19 may 2021
Envío de email con Gmail vía XOAUTH2
En esta sección se explica como enviar emails con Gmail vía XOAUTH2.
1. Obtener credenciales de XOAUTH2
Seguir estos pasos para generar el Client ID y Client secret.
2. Generar Refresh Token
2.1) En SIU-Guaraní Gestión editar el archivo vendor/phpmailer/phpmailer/get_oauth_token.phpconfigurando las variables $clientId y $clientSecret con las credenciales generadas en el [#obtener-credenciales-XOAUTH2 paso 1].
2.2) En SIU-Guaraní Gestión editar el archivo instalacion/toba.conf agregando la siguiente entrada:
#Configuración de Gmail vía XOAUTH2
Alias /phpmailer "<PATH-GESTION>/vendor/phpmailer/phpmailer/"
<Directory <PATH-GESTION>/vendor/phpmailer>
DirectoryIndex get_oauth_token.php
<IfModule !mod_access_compat.c>
#Apache 2.2.x
##Piense en actualizar la version del web server a Apache 2.4.x al menos
##Si desea seguir en esta version, descomente las siguientes lineas
# Order allow,deny
# Allow from all
</IfModule>
<IfModule mod_access_compat.c>
#Apache 2.3.x/2.4.x back-comp (deprecated)
Order allow,deny
Allow from all
</IfModule>
<IfModule mod_authz_core.c>
#Apache 2.4.x
Require all granted
</IfModule>
</Directory>
Alias /phpmailer "<PATH-GESTION>/vendor/phpmailer/phpmailer/"
<Directory <PATH-GESTION>/vendor/phpmailer>
DirectoryIndex get_oauth_token.php
<IfModule !mod_access_compat.c>
#Apache 2.2.x
##Piense en actualizar la version del web server a Apache 2.4.x al menos
##Si desea seguir en esta version, descomente las siguientes lineas
# Order allow,deny
# Allow from all
</IfModule>
<IfModule mod_access_compat.c>
#Apache 2.3.x/2.4.x back-comp (deprecated)
Order allow,deny
Allow from all
</IfModule>
<IfModule mod_authz_core.c>
#Apache 2.4.x
Require all granted
</IfModule>
</Directory>