close

[轉貼自]http://tw.myblog.yahoo.com/vcd025/article?mid=538&prev=539&next=536


 


phplist電子報系統安裝與架設紀錄



分類:技術文章

2010/01/29 13:48


PHPList網路上相關的教學非常多只要請Google大神找一下就一堆了


此篇文章紀錄整合相關問題點以防以後老人痴呆


下載最新版本phplist 2.10.10


解壓縮後把lists這個目錄移動到Web server下吧


1.編輯lists/config/config.php
//中文語系
$language_module = "tchinese.inc";


//設定與資料庫MySql的連結


$database_host = "localhost"; 


$database_name = "emd";


$database_user = "edmuser";


$database_password ="PASSWORD '';



更改 define ("TEST",1); 成 define ("TEST",0); 才不會一直停留在測試模式
 
2.解決大量匯入使用者無法出現選項的問題


lists/admin/info 複製 en ,改名為 zh-tw


lists/admin/help複製 en ,改名為 zh-tw


3.資料庫的字型預設值為unicode_general_ci的設定時,要修改/lists/admin/structure.php


的line 69


 "email" => array("varchar(255) not null unique","Email"),


修改為


"email" => array("varchar(233) not null unique","Email"),


phplist官網說明 http://mantis.phplist.com/view.php?id=8583



4.開始安裝
http://localhost/lists/admin,點選初始化資料庫開始安裝


5.修改php.ini
SMTP =  localhost or IP
sendmail_from = server@domain



6.移除寄信時附加的 phplist logo
 
/lists/admin/sendemaillib.php
# Logo mark $text["signature"] = "\n\n--\nPowered by PHPlist, www.phplist.com --\n\n";     //文字註解


/* Logo mark
  if (!EMAILTEXTCREDITS) {
    $html["signature"] = $PoweredByImage;#'


http://www.phplist.com"> src="p
owerphplist.png" width=88 height=31 title="Powered by PHPlist" alt="""""""""Powered"""""""" by PHPlist" border="0">
';
    # oops, accidentally became spyware, never intended that, so take it out again :-)
    $html["signature"] = preg_replace('/src=".*power-phplist.png"/','src="powerphplist.png"',$html["signature"]);
  } else {
    $html["signature"] = $PoweredByText;
  }
*/



7.解決發送電子報存檔時中文標題亂碼的問題



下列的方式好像是phplist 2.10.10以前的版本才有用
/lists/admin/send_core.php line 813:
將這一行
value="'.htmlentities($subject).'" size=40>
換成
value="'.htmlentities($subject,ENT_COMPAT,'UTF-8').'" size=40>


phplist 2.10.10的版本需要
找到 1034 行
//value="'.htmlentities(iconv('ISO-8859-1','UTF-8',$subject),ENT_QUOTES,'UTF-8').'" size=40>
改成
//value="'.htmlentities($subject,ENT_QUOTES,'UTF-8').'" size=40>


1040行
value="'.htmlentities(iconv('ISO-8859-1','UTF-8',$from),ENT_QUOTES,'UTF-8').'" size=40>
改成
value="'.htmlentities($from,ENT_QUOTES,'UTF-8').'" size=40>


8.退信機制設定
以Gmail為例


設定/lists/config/config.php


$bounce_protocol = 'pop';
$message_envelope = 'username@gmail.com';
$bounce_mailbox_host = 'pop.gmail.com';
$bounce_mailbox_user = 'username@gmail.com';
$bounce_mailbox_password = 'password';
$bounce_mailbox_port = "995/pop3/ssl";



9.寄送速率設定


每次寄送的信件數,預設為0不限制


define("MAILQUEUE_BATCH_SIZE",0);


每次寄送的間隔,預設為3600秒


define("MAILQUEUE_BATCH_PERIOD",3600);


如果要設定為每秒寄出一封的話size=1,period=1



10.如果寄送測試信件時出現--->找不到電子郵件位址來寄送測試電子報


這是因為收件人要先建立在電子報會員名單中才能發送




11.發送email的時候無法顯示超連結的圖片


是因為使用者設定欄位中的寄送 HTML 信件給這個使用者預設是0 (純文字)更改成1 (html)


讓這個帳號可以接收html的格式即可


12.Mailer Error: Could not instantiate mail function.


寄完信件後看事件紀錄會發現出現 Mailer Error: Could not instantiate mail function.


這是因為config.php參數設定的問題


更改 define("PHPMAILER",1);   ---->成 define("PHPMAILER",0);




arrow
arrow
    全站熱搜

    chyuanyiin 發表在 痞客邦 留言(0) 人氣()