A continuación vamos explicar de una forma fácil y sencilla como configurar unos parámetros en nuestra plataforma Moodle, para poder utilizar estas fantásticas herramientas que Google nos ofrece, en nuestra plataforma Moodle.
Configurar valores de la plataforma
Entramos en nuestra plataforma, en concreto en la pestaña de “Servidor” y depúes en “Email”.
Una vez dentro veremos una configuración predeterminada para estos valores, a continuación los modificaremos por los siguientes:
- Servidores SMTP: smtp.gmail.com:465
- Nombre de usuario SMTP: micuenta@gmail.com (Ojo, debes de ingresar toda tu cuenta de correo electrónico. Si tienes configurado en tu Dominio Google Apps, puedes cambiar “gmail.com” por tu dominio, por ejemplo, “micuenta@midominio.com”)
- Contraseña SMTP: tu clave de usuario.
Con esto, habremos completado el primer paso, a hora necesitamos editar un archivo.
Editamos el archivo class.smtp.php
Moodle tiene ciertas “limitaciones” en la versión 1.9.4.x para realizar este ajuste desde una interfaz Web.
Es por ello que necesitamos poder ingresar una sencilla línea de código para que nuestro método de envío de correos electrónicos o mails, funcione correctamente.
Para ello, usando su cliente FTP o cliente SSH, necesitan ir al directorio en el cual instalaron Moodle, y buscar la carpeta: /lib/phpmailer
Una vez dentro de esta carpeta, necesitan editar el archivo class.smtp.php
¿Qué hay qué hacer con este archivo?
Vale, básicamente, justo en la línea 83 aproximadamente, escribir lo siguiente:
$host = ’ssl://’ . $host;
Explicado de otra manera, la idea es que puedan cambiar es bloque de código…
/*************************************************************
* CONNECTION FUNCTIONS *
***********************************************************/
/**
* Connect to the server specified on the port specified.
* If the port is not specified use the default SMTP_PORT.
* If tval is specified then a connection will try and be
* established with the server for that number of seconds.
* If tval is not specified the default is 30 seconds to
* try on the connection.
*
* SMTP CODE SUCCESS: 220
* SMTP CODE FAILURE: 421
* @access public
* @return bool
*/
function Connect($host,$port=0,$tval=30) {
# set the error val to null so there is no confusion
$this->error = null;
# make sure we are __not__ connected
if($this->connected()) {
# ok we are connected! what should we do?
# for now we will just give an error saying we
# are already connected
$this->error =
array(”error” => “Already connected to a server”);
return false;
}
por este otro:
/*************************************************************
* CONNECTION FUNCTIONS *
***********************************************************/
/**
* Connect to the server specified on the port specified.
* If the port is not specified use the default SMTP_PORT.
* If tval is specified then a connection will try and be
* established with the server for that number of seconds.
* If tval is not specified the default is 30 seconds to
* try on the connection.
*
* SMTP CODE SUCCESS: 220
* SMTP CODE FAILURE: 421
* @access public
* @return bool
*/
function Connect($host,$port=0,$tval=30) {
$host = ’ssl://’ . $host;
# set the error val to null so there is no confusion
$this->error = null;
# make sure we are __not__ connected
if($this->connected()) {
# ok we are connected! what should we do?
# for now we will just give an error saying we
# are already connected
$this->error =
array(”error” => “Already connected to a server”);
return false;
}
Con este cambio, tendrán configurado correctamente el servidor SMTP de Gmail para que Moodle lo pueda utilizar en el envío de mensajes o correos electrónicos, en sus procesos de autentificación, etc.
Ya podremos utilizar estas magníficas herramienta en nuestra plataforma moodle, esperamos que sean de vuestro interés este artículo.
Saludos NoticiasMoodle.com

