Tag Archives: Google Apps

Configure Clientexec to send mail using Google Apps

If you use Clientexec as your hosting company’s management and support web application, and Google Apps for your emailing (or even just GMail), then, it is possible to configure Clientexec to send mails through Google SMTP server.

Unfortunately, it is not straightforward because the default Clientexec SMTP mailer (at least until 3.2.3 version of this software) can not handle SSL/TLS as Google required. You will need to manually modify the PHPMailer that is embedded on Clientexec.

The steps are not difficult, here they are:

First, open the file /{clientexec-directory}/newedge/classes/PHPMailer.php

Comment out the following part of the code (around line 537):

if(strstr($hosts[$index], ":"))
  list($host, $port) = explode(":", $hosts[$index]);

And just bellow those line, add the following:

    list($protocol,$hostPort) = explode("://",$hosts[$index]) ;
if(strstr($hostPort, ":"))
    list($host, $port) = explode(":", $hostPort);

Then, on EMail Settings inside Clientexec, use:

User: your-address@your-google-apps-domain

Password: your-google-apps-password

Host: ssl://smtp.gmail.com

Port: 465

Now, Clientexec should be sending mails without problems through your Google Apps email account, and all sent emails will be stored on that account.

Redmine y GMail

Siguiendo mi post anterior, lo siguiente que hice fue configurar el Redmine (versión 0.8-stable) con una cuenta de correo de GMail (Google Apps para ser más exactos) y que los correos sean enviados desde esa cuenta.

El problema es que el servidor SMTP del Gmail utiliza TLS, por lo que es necesario instalar primero el plugin Action Mailer. Se puede hacer directamente desde la consola así:

script/plugin install http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls

Y luego se modifica el archivo config/email.yml (o crearlo a partir de config/email.yml.example) de la siguiente manera:

# Outgoing email settings
  delivery_method: :smtp
    address: "smtp.gmail.com"
    port: "587"
    domain: "dominio-en-google-apps.com"
    authentication: :login
    user_name: "usuario@dominio-en-google-apps.com"
    password: "contraseña"
    tls: true
  delivery_method: :smtp
    port: 25
    domain: example.net
    authentication: :login
    user_name: redmine@example.net
    password: redmine