PHP Classes

Simple PHP Newsletter & Mailing System: Send a newsletter to users stored in a database

Recommend this page to a friend!
  Info   View files Example   View files View files (26)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 117 This week: 1All time: 9,528 This week: 560Up
Version License PHP version Categories
php-simple-newslette 1.0GNU Lesser Genera...5HTML, Email, PHP 5, Databases
Description 

Author

This package can send a newsletter to users stored in a database.

It provides functions that connect to a database using PDO and perform several operations to manage subscribers of newsletters. Currently, it can:

- Register users
- Check if users are already subscribed
- Update subscriber details
- Remove subscribers
- Deliver the newsletter messages to the email addresses of those subscribers using HTML templates to define the mailing messages

Picture of mohammad anzawi
  Performance   Level  
Name: mohammad anzawi <contact>
Classes: 8 packages by
Country: Jordan Jordan
Age: 9
All time rank: 14322 in Jordan Jordan
Week rank: 106 Up1 in Jordan Jordan Up
Innovation award
Innovation award
Nominee: 2x

Example

<?php
/**
 * DEMO FILE ..
 */
require_once 'load.php';
$data = array(
   
'u_name' => 'test',
   
'u_email' => 'test',
   
'activation_key' => 'test'
);

if(isset(
$_POST['add_user'])) {
   
$errors = array();
   
$post_ = escape($_POST);

    if(!
preg_match("/^[a-zA-Z_\-.0-9]/", $post_['user_name'])) {
       
$errors[] = "the username must be Latin characters , Numbers and ( . , - , _ ) charcters ONLY ";
    }
    if(!
filter_var($post_['user_email'], FILTER_VALIDATE_EMAIL)) {
       
$errors[] = "invalid email address";
    }

    if(!
count($errors)) {
       
$send = new Sender();
         if(
$send->sendThanksTemplateAndActivationKey($post_['user_name'],
           
$post_['user_email']))
         {
         echo
"Added Successfuly ... See your Email ....";
         } else {
             echo
implode('<br>', $send->getErrors());
         }
   
    } else {
        echo
implode('<br>', $errors);
    }
}
?>

<form action="?subscribe=on" method="POST">

    <input type="text" name="user_name"> <br>
    <input type="text" name="user_email"> <br>


    <input type="submit" name="add_user" value="subscribe">

</form>


Details

---------------------------------------------------------------------------

this Project Created by Mohammad Anzawi

This project is intended for beginners and learners

The main objective of this project is to see the way do something similar,

such as sending messages via e-mail, files Read the content and create

templates or other

and saved on the server within a specific folder.

Can anyone who want to modify or development (add some functions, styles),#

and use it in his dite, or commercially.

so if you have any question -> ask me on m.anzawi2013@gmail.com

or visit my blog on http://www.phptricks.org

---------------------------------------------------------------------------

DB Class documentation -> arabic :http://www.phptricks.org/pdo-class/ english: https://github.com/anzawi/php-database-class

NO License ...........


  Files folder image Files  
File Role Description
Files folder imageactivate (1 file)
Files folder imageadmin (7 files)
Files folder imageclasses (5 files)
Files folder imageemail_templates (4 files)
Files folder imagefunctions (1 file)
Files folder imagenbproject (2 files, 1 directory)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file load.php Aux. Auxiliary script
Accessible without login Plain text file ns.sql Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  activate  
File Role Description
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  admin  
File Role Description
  Accessible without login Plain text file adduser.php Example Example script
  Accessible without login Plain text file CreateTemp.php Aux. Auxiliary script
  Accessible without login Plain text file deleteUser.php Example Example script
  Accessible without login Plain text file editeUsers.php Example Example script
  Accessible without login Plain text file index.php Aux. Auxiliary script
  Accessible without login Plain text file sendNew.php Example Example script
  Accessible without login Plain text file ShowTemp.php Example Example script

  Files folder image Files  /  classes  
File Role Description
  Accessible without login Plain text file DB.php Class Class source
  Accessible without login Plain text file Sender.php Class Class source
  Accessible without login Plain text file ShortCode.php Class Class source
  Accessible without login Plain text file Subscribe.php Class Class source
  Accessible without login Plain text file Template.php Class Class source

  Files folder image Files  /  email_templates  
File Role Description
  Accessible without login HTML file email.html Doc. Documentation
  Accessible without login HTML file newOneTemplate.html Doc. Documentation
  Accessible without login HTML file notfy_admin.html Doc. Documentation
  Accessible without login HTML file thanks.html Doc. Documentation

  Files folder image Files  /  functions  
File Role Description
  Accessible without login Plain text file functions.php Example Example script

  Files folder image Files  /  nbproject  
File Role Description
Files folder imageprivate (2 files)
  Accessible without login Plain text file project.properties Data Auxiliary data
  Accessible without login Plain text file project.xml Data Auxiliary data

  Files folder image Files  /  nbproject  /  private  
File Role Description
  Accessible without login Plain text file private.properties Data Auxiliary data
  Accessible without login Plain text file private.xml Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:117
This week:1
All time:9,528
This week:560Up