本文为大家提供了php邮件管理器源码,希望大家喜欢。
1、需求分析
管理员应该能够建立和修改邮件内容。
管理员应该能够将文本或html格式的新闻信件发送给一个列表中的所有订阅者。
用户应该能够通过注册使用一个站点,并且可以进入并修改他们的个人资料。
用户应该能够订阅该站点的任意一个列表的新闻信件。
用户应该能够取消一个邮件列表的订阅。
用户应该能够根据个人喜好以html格式或纯文本格式存储新闻信件。
处于安全的原因,用户应该不能将邮件发送到列表,或者不能看见其他用户的邮件地址。
用户和管理员应该能够查看有关邮件列表的信息。
用户和管理员应该能够查看过去已经噶送给某个列表(存档文件)上的新闻信件。
2、解决方案
2.1 用户权限图
2.2 邮件列表管理器中的文件列表
2.3 邮件列表管理器中可能的操作
3、实现数据库
create database mlm; #创建mlm数据库  use mlm; #使用mlm数据库  create table lists #列表 (  listid int auto_increment not null primary key, #列表id  listname char(20) not null, #列表名  blurb varchar(255) #列表主要内容 );  create table subscribers #订阅者 (  email char(100) not null primary key, #邮箱  realname char(100) not null, #真实姓名  mimetype char(1) not null, #想要接收邮件类型  password char(40) not null, #密码  admin tinyint not null #管理员标记 );  create table sub_lists #订阅-列表关系表 (  email char(100) not null, #邮件  listid int not null #列表id );  create table mail #邮件表 (  mailid int auto_increment not null primary key, #邮件id  email char(100) not null, #发送方  subject char(100) not null, #主题  listid int not null, #列表id  status char(10) not null, #邮件状态,是否被发送  sent datetime, #发送时间  modified timestamp #最后一次修改时间戳 );  create table images #图像表 (  mailid int not null, #邮件id  path char(100) not null, #路径  mimetype char(100) not null #图片类型 );  grant select,insert,update,delete #创建mlm用户 on mlm.* to mlm@localhost identified by 'password';  #插入订阅者标记 insert into subscribers values ('admin@localhost','administrative user','h',sha1('admin'),1);  insert into subscribers values ('switch_1@switch.com','administrative user','h',sha1('admin'),1); 
希望本文所述对大家学习php程序设计有所帮助。
   
 
   