Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 4:38 pm (All times are UTC )

 





Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Mails considerados spam
Posted: Wed Nov 22, 2006 6:04 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Sep 14, 2005 5:59 am
Posts: 113
Hola gente!
Varios usuarios se registran más de dos veces y no reciben el mensaje de validación, porque va a parar a la carpeta de spam.
En Global Configuration > Mail, uso
Php mail function 
En SMTP Auth: No
y localhost.

He consultado con mi proveedor de hosting, su respuesta es que las máquinas lo consideran Spam (pero no lo es)
Alguno de ustedes tiene la solución a este problema?
Desde ya muchas gracias!
Saludos,
Grace


Top
  E-mail  
 
Posted: Mon Dec 11, 2006 1:35 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Fri Aug 19, 2005 4:01 am
Posts: 871
Location: Buenos Aires Argentina
Creo que hay que avisarles que eso puede pasar y que si ocurre revisen sus carpetas de spam antes de volver a registrarse. Asegurate que el mail usado por el Joomla sea un mail válido. aun cuando salga del Joomla puedes configurarlo en el sitio.

_________________
Atrevidoweb
Bajate el Idioma Español para Joomla! 1.5 Tanto para sitios nuevos como para actualizar el que ya tienes.


Top
   
 
Posted: Mon Dec 11, 2006 4:09 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Sep 14, 2005 5:59 am
Posts: 113
Muchas gracias Atrevido, tendré en cuenta tus consejos. He puesto un comentario al repecto, pero no todos los leen. Por ahora si dentro las 24 Hs de registrados no validan la cuenta, les envío un mensaje desde otro mail para verificar si es de ellos.
Me gustaría usar el SMTP si se pudiese encriptar la clave como en el Wordpress.
Saludos,
Grace


Top
  E-mail  
 
Posted: Tue Dec 12, 2006 12:21 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Mar 11, 2006 10:57 am
Posts: 108
Creo que esto se debe a los headers del mail generado a través de la función mail.
Los detectores de spam de los clientes de correo leen estos headers y si suenan a automatizados consideran el correo como spam.

Alguien ha mirado cómo funciona la clase de joomla que envía mails?

Sería bueno revisarla.

Saludos


Top
  E-mail  
 
Posted: Fri Dec 15, 2006 7:12 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Sep 14, 2005 5:59 am
Posts: 113
Hola, he mirado y  consultado como expliqué. El PHPMailer se considera Spam cuando como aviso de retorno contiene nobody... 
Pasará lo mismo en los servidores dedicados?
Cuando disponga de dinero suficiente para contratarlo lo sabré.
Saludos,
Grace


Top
  E-mail  
 
Posted: Fri Dec 15, 2006 1:17 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sat Mar 11, 2006 10:57 am
Posts: 108
Hola Grace!

Podés leer este artículo sobre los headers de e mail, donde ahce un análisis de por qué algunos mails pueden ser considerados spam.

En includes/joomla.php tenés las funciones que construyen los e mails, acá adjunto un extracto de ellas de las versión 1.0.11:

Code:
/**
* Function to create a mail object for futher use (uses phpMailer)
* @param string From e-mail address
* @param string From name
* @param string E-mail subject
* @param string Message body
* @return object Mail object
*/
function mosCreateMail( $from='', $fromname='', $subject, $body ) {
   global $mosConfig_absolute_path, $mosConfig_sendmail;
   global $mosConfig_smtpauth, $mosConfig_smtpuser;
   global $mosConfig_smtppass, $mosConfig_smtphost;
   global $mosConfig_mailfrom, $mosConfig_fromname, $mosConfig_mailer;

   $mail = new mosPHPMailer();

   $mail->PluginDir = $mosConfig_absolute_path .'/includes/phpmailer/';
   $mail->SetLanguage( 'en', $mosConfig_absolute_path . '/includes/phpmailer/language/' );
   $mail->CharSet    = substr_replace(_ISO, '', 0, 8);
   $mail->IsMail();
   $mail->From    = $from ? $from : $mosConfig_mailfrom;
   $mail->FromName = $fromname ? $fromname : $mosConfig_fromname;
   $mail->Mailer    = $mosConfig_mailer;

   // Add smtp values if needed
   if ( $mosConfig_mailer == 'smtp' ) {
      $mail->SMTPAuth = $mosConfig_smtpauth;
      $mail->Username = $mosConfig_smtpuser;
      $mail->Password = $mosConfig_smtppass;
      $mail->Host    = $mosConfig_smtphost;
   } else

   // Set sendmail path
   if ( $mosConfig_mailer == 'sendmail' ) {
      if (isset($mosConfig_sendmail))
         $mail->Sendmail = $mosConfig_sendmail;
   } // if

   $mail->Subject    = $subject;
   $mail->Body    = $body;

   return $mail;
}

/**
* Mail function (uses phpMailer)
* @param string From e-mail address
* @param string From name
* @param string/array Recipient e-mail address(es)
* @param string E-mail subject
* @param string Message body
* @param boolean false = plain text, true = HTML
* @param string/array CC e-mail address(es)
* @param string/array BCC e-mail address(es)
* @param string/array Attachment file name(s)
* @param string/array ReplyTo e-mail address(es)
* @param string/array ReplyTo name(s)
* @return boolean
*/
function mosMail( $from, $fromname, $recipient, $subject, $body, $mode=0, $cc=NULL, $bcc=NULL, $attachment=NULL, $replyto=NULL, $replytoname=NULL ) {
   global $mosConfig_debug;

   // Filter from, fromname and subject
   if (!JosIsValidEmail( $from ) || !JosIsValidName( $fromname ) || !JosIsValidName( $subject )) {
      return false;
   }

   $mail = mosCreateMail( $from, $fromname, $subject, $body );

   // activate HTML formatted emails
   if ( $mode ) {
      $mail->IsHTML(true);
   }

   if (is_array( $recipient )) {
      foreach ($recipient as $to) {
         if (!JosIsValidEmail( $to )) {
            return false;
         }
         $mail->AddAddress( $to );
      }
   } else {
      if (!JosIsValidEmail( $recipient )) {
         return false;
      }
      $mail->AddAddress( $recipient );
   }
   if (isset( $cc )) {
      if (is_array( $cc )) {
         foreach ($cc as $to) {
            if (!JosIsValidEmail( $to )) {
               return false;
            }
            $mail->AddCC($to);
         }
      } else {
         if (!JosIsValidEmail( $cc )) {
            return false;
         }
         $mail->AddCC($cc);
      }
   }
   if (isset( $bcc )) {
      if (is_array( $bcc )) {
         foreach ($bcc as $to) {
            if (!JosIsValidEmail( $to )) {
               return false;
            }
            $mail->AddBCC( $to );
         }
      } else {
         if (!JosIsValidEmail( $bcc )) {
            return false;
         }
         $mail->AddBCC( $bcc );
      }
   }
   if ($attachment) {
      if (is_array( $attachment )) {
         foreach ($attachment as $fname) {
            $mail->AddAttachment( $fname );
         }
      } else {
         $mail->AddAttachment($attachment);
      }
   }
   //Important for being able to use mosMail without spoofing...
   if ($replyto) {
      if (is_array( $replyto )) {
         reset( $replytoname );
         foreach ($replyto as $to) {
            $toname = ((list( $key, $value ) = each( $replytoname )) ? $value : '');
            if (!JosIsValidEmail( $to ) || !JosIsValidName( $toname )) {
               return false;
            }
            $mail->AddReplyTo( $to, $toname );
         }
        } else {
         if (!JosIsValidEmail( $replyto ) || !JosIsValidName( $replytoname )) {
            return false;
         }
         $mail->AddReplyTo($replyto, $replytoname);
      }
    }

   $mailssend = $mail->Send();

   if( $mosConfig_debug ) {
      //$mosDebug->message( "Mails send: $mailssend");
   }
   if( $mail->error_count > 0 ) {
      //$mosDebug->message( "The mail message $fromname <$from> about $subject to $recipient <b>failed</b><br /><pre>$body</pre>", false );
      //$mosDebug->message( "Mailer Error: " . $mail->ErrorInfo . "" );
   }
   return $mailssend;
} // mosMail

/**
* Checks if a given string is a valid email address
*
* @param   string   $email   String to check for a valid email address
* @return   boolean
*/
function JosIsValidEmail( $email ) {
   $valid = preg_match( '/^[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,4}$/', $email );
   
   return $valid;
}

/**
* Checks if a given string is a valid (from-)name or subject for an email
*
* @since      1.0.11
* @deprecated   1.5
* @param      string      $string      String to check for validity
* @return      boolean
*/
function JosIsValidName( $string ) {
   /*
    * The following regular expression blocks all strings containing any low control characters:
    * 0x00-0x1F, 0x7F
    * These should be control characters in almost all used charsets.
    * The high control chars in ISO-8859-n (0x80-0x9F) are unused (e.g. http://en.wikipedia.org/wiki/ISO_8859-1)
    * Since they are valid UTF-8 bytes (e.g. used as the second byte of a two byte char),
    * they must not be filtered.
    */
   $invalid = preg_match( '/[\x00-\x1F\x7F]/', $string );
   if ($invalid) {
      return false;
   } else {
      return true;
   }
}


Quizás agregando un Header especial usando la función AddCustomHeader de phpMailer, algo así como:

Code:
$mail -> AddCustomHeader('Disposition-Notification-To:'.$from);

en la función mosCreateMail

Ni siquiera sé si lo estoy escribiendo bien, pero supongo que podría servir si se mejora un poco.

Saludos!


Top
  E-mail  
 
Posted: Sat Dec 16, 2006 1:27 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Sep 14, 2005 5:59 am
Posts: 113
Muchas gracias Matías! interesante el artículo. Sinceramente dudo en realizar cambios en el Phpmailer, porque hace un mes cambiaron mi sitio de máquina y durante un tiempo estuvo en paralelo hasta la finalización de la mudanza.
Prometo leer todo y consultar en el foro del hosting antes de realizar cambios.
Saludos
 


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group