My server requires the use of authorized smtp for sending email. I also wanted to check out the simplenews newsletter module.

After much digging i sorted out a bunch of issues with both of these and made a small "handbook" in the process. I thought it might be usefull to people; it can be found at:

http://www.liquidcms.ca/smtp

Peter Lindstrom
LiquidCMS - Content Management Solution Experts

Comments

Anonymous’s picture

This was exactly what I was looking for, thanks a lot. I'd like to add some information, since now there is a smtp module (http://drupal.org/project/smtp) which adds phpmailer to drupal. However, simplenews still doesn't use it, so your patch is still current. For those who like diff's here's what you have to patch in simplenews' activeMailLib.php:

--- activeMailLib.php   Mon Apr  9 14:51:56 2007
+++ activeMailLib.php.orig      Thu Mar  1 16:40:09 2007
@@ -179,21 +179,10 @@
                foreach($this->mailto as $res){
                $serv=$this->mkCheckServer($res);
                $this->serv[$res]=$serv[1];
-                       //if ($serv[0]==true) $this->mailsent[$res]=mail($res, $this->mailsubj, $this->mailbody, $this->mailheaders);
-                       //else $this->mailsent[$res]=false;
-//----------------------------HACK--------------------------------------
-
-            if ($serv[0]==true) $this->mailsent[$res]=user_mail($res, $this->mailsubj, $this->mailbody, $this->mailheaders);
-            else $this->mailsent[$res]=false;
-            $message=t('Results of user_mail: %resul',array('%resul'=>$this->mailsent[$res]));
-            watchdog('activeMailLib', $message, WATCHDOG_WARNING);
-        }
-    }
-    else{
-        $message=t('There are troubles with the mailito and mailfrom fields go to administer->settings and set a name and a email for the site.');
-        watchdog('activeMailLib', $message, WATCHDOG_WARNING);
-//-------------------------Fin del HACK--------------------------------
+                       if ($serv[0]==true) $this->mailsent[$res]=mail($res, $this->mailsubj, $this->mailbody, $this->mailheaders);
+                       else $this->mailsent[$res]=false;
                }
+       }
 }
 //==============================================================================================
 // PUBLIC isSent() -> checks if a mail has been sent
diegohermes’s picture

I dowload the 5.1 release of simplenews and it don't have the activeMailLib.php file, how can i fix the problem if they don't use the file anymore ( i think they don't, since they don't put the file in the release).