Konrasee’s Weblog

Just another WordPress.com weblog

Posts Tagged ‘config

config mrbs ให้ส่งอีเมลแจ้งเตือน

leave a comment »

วิธีการ config mrbs ให้ส่งอีเมลแจ้งเตือน admin (ทั้งที่เป็น site admin, Area Admin, Room Admin) เมื่อมีการ add/edit/delete booking(รายการจอง) ซึ่งกำหนดได้ดีในระดับหนึ่ง โดยแยกได้ว่าเมื่อมีการ เพิ่ม/แก้ไข/ลบรายการใดๆ แล้วให้ส่งอีเมลเตือนทันที

ประการแรก: Config ค่าต่างในโปรแกรม mrbs  ส่วนของการส่งอีเมล โดยเปิดไฟล์ config.inc.php แล้วมองหาส่วนของ

###############################################
# Email settings
###############################################

# You can override the charset used in emails if $unicode_encoding is 1
# (utf-8) if you like, but be sure the charset you choose can handle all
# the characters in the translation and that anyone may use in a
# booking description
# กำหนด character set ให้อีเมล เป็น utf-8
$mail_charset = “utf-8″;

# SET เป็น TRUE เมื่อต้องการให้ส่งอีเมลแจ้ง Admin เมื่อมีการจองห้องประชุม
define (“MAIL_ADMIN_ON_BOOKINGS”, FALSE);

# SET เป็น TRUE เมื่อต้องการให้ส่งอีเมลแจ้ง Area Admin เมื่อมีการจองห้องประชุม
define (“MAIL_AREA_ADMIN_ON_BOOKINGS”, FALSE);

# Set เป็น TRUE เมื่อต้องการให้ต้องการให้ส่งอีเมลแจ้ง Room Admin
# เมื่อมีการจองห้องประชุม
define (“MAIL_ROOM_ADMIN_ON_BOOKINGS”, TRUE);

#แจ้งเมลให้ admin เมื่อมีการลบรายการ
define (“MAIL_ADMIN_ON_DELETE”, FALSE);

#แจ้งเมลทุกครั้งที่มีการดำเนินการเกี่ยวกับรายการจองห้องประชุม ทั้งเพิ่ม แก้ไข
#และลบ ปกติจะส่งเฉพาะรายการที่เป็นรายการใหม่
define (“MAIL_ADMIN_ALL”, TRUE);

#ในเนื้อเมลให้แจ้งรายละเอียดด้วย ปกติแล้วจะแจ้งเฉพาะ link ให้เข้าดูรายการจอง
define (“MAIL_DETAILS”, TRUE);

# เมื่อต้องการให้เมลแจ้งรายละเอียดแก่ผู้เพิ่มรายการด้วย
define (“MAIL_BOOKER”, TRUE);

# กำหนด domain
define (“MAIL_DOMAIN”, ‘@abcd.com’);

#เลือกการส่งอีเมลแบบ smtp
define (“MAIL_ADMIN_BACKEND”, “smtp”);

#*******************
# Sendmail settings

# Set the path of the Sendmail program (only used with “sendmail” backend).
# Default is “/usr/bin/sendmail”
define (“SENDMAIL_PATH”, “/usr/bin/sendmail”);

# Set additional Sendmail parameters (only used with “sendmail” backend).
# (example “-t -i”). Default is “”
define (“SENDMAIL_ARGS”, ”);

#*******************
# SMTP settings

#ตั้งค่า smtp server ที่ใช้
define (“SMTP_HOST”, “smtp.abcd.com”);

# Set smtp port to connect. Default is ’25′ (only used with “smtp” backend).
define (“SMTP_PORT”, 25);

# Set whether or not to use SMTP authentication. Default is ‘FALSE’
define (“SMTP_AUTH”, FALSE);

# Set the username to use for SMTP authentication. Default is “”
define (“SMTP_USERNAME”, ”);

# Set the password to use for SMTP authentication. Default is “”
define (“SMTP_PASSWORD”, ”);

ประการต่อมา: เมื่อเพิ่ม Area หรือ Room นั้นต้องระบุอีเมลของคนที่จะเป็น admin ของแต่ละรายการด้วย เช่น เพิ่ม Area A, โดยมี Admin เป็น a@abcd.com เป็นต้น
สุดท้าย: ลองเพิ่มรายการและแก้ไขรายการดูครับ ถ้าไม่มีอะไรผิดพลาดมันจะต้องส่งอีเมลไปให้ Admin

Written by konrasee

ตุลาคม 14, 2008 at 4:18 pm

บันทึกโพสใน Open source, PHP

Tagged with ,

Follow

Get every new post delivered to your Inbox.