1.9.4. Weekly upgrade stopped emails out How can I make it work again?

1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Number of replies: 28
I upgraded yesterday my version 1.9.2 weekly to version 1.9.4 weekly without any unchecked server tests pending (all were OK) but now MOODLE is not email anybody (new users, forum users, ect) I checked MOODLE new users registration and email settings and they are the same as they were before the upgrade. Has anybody experience this too?

Is there any server/database checks or steps I can do to solve it?

Is this a bug of version 1.9.4 weekly?

HELP me please I am the teacher for several college classes and I am not computer literated
Average of ratings: -
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Hi Alexander,

I am facing the same issue. Just to make sure we have the same problem, please find and report here:
  • if you have empty field Site Admin > Server > Email > SMTP hosts (so Moodle uses internal PHP mail() function). Or do you have some value there?
  • try to switch SMTP debugging on and check the recent activity log
I have put some comments into MDL-15295

David
Average of ratings: Useful (1)
In reply to David Mudrák

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Hi David

Indeed this has proven a major problem since I am starting my online classes today and I am not very good with configuring all these parameters in Moodle.

My upgrade version is Moodle 1.9.4 (Build: 20090128)

My PHP Version 5.2.6
System Linux web506.opentransfer.com 2.6.26.5-SMP2 #6 SMP Fri Sep 26 19:59:05 CDT 2008 i686

I dont have any value in SMTP Hosts is blank by default so it is using the PHP mail function

I have turned on the SMTP debugging and will check its log and comment back

I think you may be correct and it is the PHP 5 conflicting with the php mail function
In reply to David Mudrák

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Apparently the only solution is go downgrade to version 1.9.2 stable since I found 3 other online reports here discussing the same problem on version 1.9.3 and still no solution to this serious mailing bug.
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Alexander,

I am afraid downgrade is not a solution here. Moodle uses the same version of phpmailer library since 2007. My guess is you have upgraded your PHP recently as well, have you?

I am trying to work on this as well. This is a workaround I found in cooperation with the webhosting tech support: they gave me an access to an SMTP relay host. So I configured Moodle to connect to this SMTP instead of using internal mail(). It started to work again then.

Can you please post a link to the reports found by yourself?

Thanks, hopefuly we will sort this out soon...
Average of ratings: Useful (1)
In reply to David Mudrák

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Thanks David for your assistance with this major upgrade mailer bug

Indeed I moved my MOODLE to a new server that has PHP5.x since in all recent Moodle 1.9.x installation documentation indicates that PHP 5.x MUST be used to have 100% functionability ....

The sad part is that version 1.9.2 weekly was working great on PHP 4.x, so to all other Moodle users: DO NOT UPGRADE OR MIGRATE YOUR SERVERS from PHP 4.x to PHP 5.x until Moodle 1.9.x solves this mailing bug!

How can I configure Moodle to connect to a SMTP instead of using internal mail ()? I have in my hosting account this:


Incoming POP3 Server mail.geomatica.biz
Outgoing (SMTP) Server mail.geomatica.biz


This is my Geomatica.biz/Moodle log report

http://geomatica.biz/moodle/course/report/log/index.php?chooselog=1&showusers=1&showcourses=1&id=1&user=0&date=1233633600&modid=&modaction=0&logformat=showashtml

Thanks for your help amigo!!
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Jesús Martín -
Saludos.

With Debian 4.0 I followed these steps:

http://www.howtoforge.com/perfect_setup_debian_etch_p5 (only chapter 11)

And the mail service works...

Hasta otra.

J. Martin



Average of ratings: Useful (1)
In reply to Jesús Martín

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Saludos Jesus y gracias por tu asistencia con este problema... disculpame pero no se nada de programacion de Linux por lo que no se como hacer lo me dice tu link estoy frito ya que no podre impartir mis clases en la universidad...

I am reading the link you sent me but I must confess I dont know understand what are the steps and how to do it to fix this email problem... can you give me a little more detail please?


In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Jesús Martín -
Saludos de nuevo.
No sé qué sistema operativo tienes... daba por supuesto que es Linux. A mí me pasaba exactamente lo mismo hasta que instalé esa parte en el servidor. ¿No tienes un administrador que te pueda echar una mano?

Otra opción:
- Configurar una cuenta gmail para que envíe los correos (no la he probado pero si está documentada en la wiki oficial de Moodle, es muy probable que funcione):

http://docs.moodle.org/en/Email_setup_gmail

Suerte. J. Martín
Average of ratings: Useful (1)
In reply to Jesús Martín

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Hola Jesus

Se que tengo una cuenta en el servidor privado de Linux (ya el que hay en la Universidad estatal hay una cantidad brutal de virus que no hay forma). No tengo administrador, este es un esfuerzo que estoy haciendo por mi mismo para darle clases gratuitas a los sectores mas pobres

Si tengo mi en mi hosting el outgoing SMTP mail.geomatica.biz lo puedo configurar para que envie estos correos de Moodle ?
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Jesús Martín -
Saludos otra vez. Hasta donde yo sé:
- Si tienes cuenta de "root" en el servidor privado Linux sería posible seguir los pasos que te indiqué anteriormente. No es muy difícil, aunque pueda parecer lo contrario a simple vista. Te puedo ayudar si tienes debian o ubuntu.
- Si no instalas en el servidor de Linux al menos un cliente de correo (yo te sugería en ese enlace Postfix), php5 no puede enviar nada. Es lo que te ocurre, me da la impresión, en estos momentos.
- Para utilizar la cuenta mail.geomatica.biz tienes que tener en esa máquina de Linux instalado el servidor (no un cliente) de correo y no es el caso. Creo que aunque pongas en el servidor de correo saliente (o smtp) los datos correctos no va a hacer nada.
- Por eso, yo creo que lo más simple es intentar instalar la configuración de gmail.

Suerte.
Average of ratings: Useful (1)
In reply to Jesús Martín

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Hola Jesus

Ya hice los 3 pasos de Gmail pero quiero que me confirmes si esta es la modificacion que tengo que hacer en la funcion CONNECT del lib/phpmailer/......en la linea 83 de mi Moodle 1.9.4?

* 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;

In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Jesús Martín -
Saludos.
Creo que sí que está bien. Puedes ponerlo en dos líneas:

function Connect($host,$port=0,$tval=30) {
$host = 'ssl://' . $host;

No te olvides de configurar en el menú de administrador

Location: Administration > Server > Email

SMTP hosts: smtp.gmail.com:465

SMTP username: Tu correo ejemplo@gmail.com

SMTP password: contraseña de la cuenta ejemplo@gmail.com

(si tienes un cortafuegos, no te olvides de abrir el puerto 465)

Ya nos contarás a ver qué tal te ha ido...


Jesús


In reply to Jesús Martín

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Jesus

I did all 3 admin/server/mail gmail account info plus the lib/phpmailer class SMTP line added and this is what MOODLE 1.9.4 error debugging reports

Notice: Undefined property: stdClass::$mnethostid in /hsphere/local/home/holsteinson/geomatica.biz/moodle/lib/moodlelib.php on line 4148

In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Obviously 1.9.4 is not PHP5.x friendly .... nor does the Gmail settings documentation work correct

Now this error message overflow has block me out of accessing the server and MOODLE.... how can I solve this?
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Jesús Martín -
He instalado un moodle en un portátil con ubuntu en modo local para probar esta configuración de gmail. He cambiado el modo de depuración a Desarrollador para ver todos los mensajes. No me da ningún error (?).
Incluso he hecho un /admin/cron.php para ver si se bloqueaba en algún proceso. Parece que todo ha ido bien. Lo que no tengo todavía constancia es de que me envíe los correos. Pero ni un mensaje de error...
Lo que no tiene mucha lógica es que ese error de smtp no te deje acceder ni al servidor ni a Moodle...

J. Martín
Attachment 001.png
In reply to Jesús Martín

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Eso me imaginaba, pero como no soy mas que un usuario final....

el servidor se ha caido luego de esta mañana cuando quise enviar un email colectivo de 30 estudiantes y no puedo accesar ni a Moodle ni al servidor

Geomatica Fri 6 February 2009, 06:55 AM 190.80.183.231 Alexander Holsteinson library mailer ERROR: SMTP Error: Could not connect to SMTP host.


Y sabes que es el mensaje de la linea 1048 que me dio?
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Jesús Martín -
Saludos.
Lo único que te dice es que no se ha podido conectar al servidor de correo de gmail. Pero no es un error de sistema ni nada que haga pensar que haga caer a todo el servidor.
Si puedes volver a configurarlo, en Límite de Sesión SMTP por 100 o así... (por defecto pone "1")

Suerte.
In reply to Jesús Martín

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Gracias mil Jesus ya lo estoy probando de nuevo con y sin el gmail ya que el folder de lib/phpmailer no tenian seleccionado EXEC por lo que quizas por eso no se ejecutaban (que opinas?)

Hay un funcionamiento parcial del email de MOODLE ya que solo envia las respuestas de los temas de los foros de MOODLE

Trate de enviarle un email colectivo a todos los participantes de un curso, pero no lo envio asi como tampoco envia el email de confirmacion cuando un usuario se registra en MOODLE. Que sera lo que falta por arreglar o configurar?
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Jesús Martín -
¿Tienes acceso como root a tu servidor con una terminal?
¿Te animas a instalar Postfix como indiqué en un mensaje anteriormente?

Por cierto, todavía no me has dicho qué sistema operativo tienes instalado...


In reply to Jesús Martín

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Estimado Jesus no se ni de que me hablas con eso de la terminal/root ect se que puedo entra a mi folder de geomatica.biz a traves de un panel de control del suplidor del hosting y veo sus configuraciones y opciones.

El email esta trabajando parcialmente cuando algun estudiante responde un tema en el foro, el email es enviado a todos. Igualmente cuando un estudiante me envia un mensaje y no lo leo a los 10minutos me envia una copia por email, pero lo que no envia todavia los emails de confirmacion cada vez que un nuevo usuario se registra... que sera?

Cambie el numero de emails por sesion a 24 ya que el proveedor de mi servicio de hosting me indico que tienen como limite por sesion 25

Sobre el sistema operativo tengo un Linux con PHP 5.x como ves abajo

PHP Version 5.2.6

System Linux web506.opentransfer.com 2.6.26.5-SMP2 #6 SMP Fri Sep 26 19:59:05 CDT 2008 i686
Build Date Jun 26 2008 16:17:25
Configure Command './configure' '--localstatedir=/var/hsphere/php' '--with-bz2=/hsphere/shared' '--enable-ctype' '--enable-dba' '--enable-ftp' '--with-gettext=/hsphere/shared' '--enable-mbstring=all' '--with-gd' '--with-mhash=/hsphere/shared' '--with-mcrypt=/hsphere/shared' '--with-openssl=/usr' '--enable-overload' '--enable-posix' '--enable-session' '--enable-sockets' '--enable-standard' '--enable-tokenizer' '--with-xml=/hsphere/shared' '--with-xsl=/hsphere/shared' '--with-zip=/hsphere/shared' '--with-zlib=/hsphere/shared' '--with-zlib-dir=/hsphere/shared' '--with-freetype-dir=/hsphere/shared' '--with-png-dir=/hsphere/shared' '--with-jpeg-dir=/hsphere/shared' '--with-expat-dir=/hsphere/shared' '--with-iconv-dir=/hsphere/shared' '--with-libxml-dir=/hsphere/shared' '--enable-gd-native-ttf' '--with-ttf' '--enable-mbstr-enc-trans' '--with-expat-dir=/hsphere/shared' '--with-xslt-sablot=/hsphere/shared' '--with-gnu-ld' '--with-curl=shared,/hsphere/shared' '--with-curlwrappers' '--with-dom=shared,/hsphere/shared' '--with-dom-xslt=/hsphere/shared' '--with-dom-exslt=/hsphere/shared' '--with-dom=shared,/hsphere/shared' '--with-fileinfo=shared,/hsphere/shared' '--with-gmp=shared,/hsphere/shared' '--with-iconv=shared,/hsphere/shared' '--with-imap=shared,/hsphere/shared' '--with-imap-ssl=shared,/usr' '--with-mcal=shared,/hsphere/shared' '--with-mysql=shared,/usr' '--with-mysqli=shared' '--with-pgsql=shared,/usr' '--with-sqlite=shared' '--enable-sqlite-utf8' '--with-unixODBC=shared,/hsphere/shared' '--with-xmlrpc=shared' '--enable-htscanner' '--enable-track-vars' '--enable-trans-sid' '--enable-memory-limit' '--enable-force-cgi-redirect' '--enable-fastcgi' '--with-config-file-path=/hsphere/local/config/httpd/php5' '--with-config-file-scan-dir=/hsphere/local/config/httpd/php5/php.d' '--enable-magic-quotes' '--with-pear=/hsphere/shared/apache/libexec/php5ext/php' '--with-mime-magic=/hsphere/local/config/httpd/magic' '--with-inifile' '--with-flatfile' '--enable-pdo=shared' '--with-pdo-sqlite=shared' '--prefix=/hsphere/shared/php5' '--disable-cli' '--enable-cgi'
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /hsphere/local/config/httpd/php5
Loaded Configuration File /hsphere/local/home/holsteinson/geomatica.biz/cgi-bin/php.ini
Scan this dir for additional .ini files /hsphere/local/config/httpd/php5/php.d
additional .ini files parsed /hsphere/local/config/httpd/php5/php.d/bcmath.ini, /hsphere/local/config/httpd/php5/php.d/calendar.ini, /hsphere/local/config/httpd/php5/php.d/curl.ini, /hsphere/local/config/httpd/php5/php.d/dbase.ini, /hsphere/local/config/httpd/php5/php.d/exif.ini, /hsphere/local/config/httpd/php5/php.d/fileinfo.ini, /hsphere/local/config/httpd/php5/php.d/gmp.ini, /hsphere/local/config/httpd/php5/php.d/htscanner.ini, /hsphere/local/config/httpd/php5/php.d/iconv.ini, /hsphere/local/config/httpd/php5/php.d/imap.ini, /hsphere/local/config/httpd/php5/php.d/ldap.ini, /hsphere/local/config/httpd/php5/php.d/mysql.ini, /hsphere/local/config/httpd/php5/php.d/mysqli.ini, /hsphere/local/config/httpd/php5/php.d/ncurses.ini, /hsphere/local/config/httpd/php5/php.d/odbc.ini, /hsphere/local/config/httpd/php5/php.d/pcntl.ini, /hsphere/local/config/httpd/php5/php.d/pdo.ini, /hsphere/local/config/httpd/php5/php.d/pdo_mysql.ini, /hsphere/local/config/httpd/php5/php.d/pdo_sqlite.ini, /hsphere/local/config/httpd/php5/php.d/pgsql.ini, /hsphere/local/config/httpd/php5/php.d/pspell.ini, /hsphere/local/config/httpd/php5/php.d/shmop.ini, /hsphere/local/config/httpd/php5/php.d/soap.ini, /hsphere/local/config/httpd/php5/php.d/sqlite.ini, /hsphere/local/config/httpd/php5/php.d/sysvmsg.ini, /hsphere/local/config/httpd/php5/php.d/sysvsem.ini, /hsphere/local/config/httpd/php5/php.d/sysvshm.ini, /hsphere/local/config/httpd/php5/php.d/xmlrpc.ini, /hsphere/local/config/httpd/php5/php.d/zmnogosearch.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, data, compress.bzip2, compress.zlib, https, ftps, tftp, ftp, telnet, dict, ldap, http
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, bzip2.*, zlib.*, convert.iconv.*

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Have someone found the fix for this new user confirmation email bug in version 1.9.4 that is not working?

I have tried everything and still there is no way for new users when the create their accounts to receive their confirmation emails.... all other emails (forum posts, messages, etc) are working ok in Moodle
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Luis de Vasconcelos -

I can't reproduce the problem on my 1.9.4+ version of Moodle. But, one thing that hasn't been suggested is: have you checked that the Moodle Cron script is running properly on your server?

In reply to Luis de Vasconcelos

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Thanks Luis I checked and it is working ok I have it set to run every 5 minutes.... it appears like it is a Moodle PHPMailer bug with PHP 5.x
In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
I have update the latest 1.9.4+ and my new users are still NOT getting their confirmation email when they create their accounts All they get is this message:

ERROR: Could not instantiate mail function.

Se ha intentado enviarle un email sin éxito.

Más información sobre este error


In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
I installed moodle 1.9.5 Weekly on a LINUX server with PHP 5.x and still this new user confirmation email bug is alive and well

HELP!!

In reply to Alexander Holsteinson

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by alfredo lopez -
Hola Alexander,

Ya no reportaste nada mas acerca de este problema y queria saber si habias encontrado alguna solucion.

De ser asi te agradeceria que la comentes por favor por q estoy sufriendo el mismo problema y he intentado intalando un software email interno, pero tampoco resulve mi problema.

Saludos

Alfredo
In reply to alfredo lopez

Re: 1.9.4. Weekly upgrade stopped emails out How can I make it work again?

by Alexander Holsteinson -
Hola Alfredo

Acabo de hacer la actualizacion al 1.9.5 Weekly de Mayo 12, 2009 y lamento decirte que todavia sigue el mismo problema y no se soluciona con ningun software de email interno (he tratado 5 diferentes y sigue igual el problema de no enviar los emails de confirmacion de nuevos usuarios asi como a veces los de los foros)

El problema esta claro es el Moodle mailer que no es compatible con el PHP Mailer para el PHP 5.x en Linux Ya trate en Windows la version 1.9.5 Weekly y funciona perfectamente el email de Moodle, por lo que no se que hacer ni que decirte ya que no soy programador y no se resolver esta incompatibilidad PHP...

Si lo solucionas dejame saber urgente

Saludos

Alex