PHP Classes

PHP Mail Sending: Send HTML email messages with attachments

Recommend this page to a friend!
  Info   View files Documentation   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2022-10-21 (11 months ago) RSS 2.0 feedStarStarStarStar 70%Total: 632 This week: 1All time: 5,011 This week: 158Up
Version License PHP version Categories
php-mail-sending 1.0.2GNU General Publi...5.5HTML, Email, PHP 5
Description 

Author

This class can send HTML email messages with attachments.

It can compose HTML email messages with an alternative text part. If the text alternative is missing, it will extract the text from the HTML.

Messages can embed images and attachment files.

Recipients can be defined for "To", "CC" or "BCC" headers.

Picture of Christian Vigh
  Performance   Level  
Name: Christian Vigh <contact>
Classes: 32 packages by
Country: France France
Age: 57
All time rank: 13810 in France France
Week rank: 10 Up1 in France France Up
Innovation award
Innovation award
Nominee: 20x

Winner: 3x

Documentation

CONTENTS OF THE EXAMPLES DIRECTORY

File examples.inc.php

This is the main include file for all the example. You will have to redefine two variables here before trying to run the examples :

  • $recipient (mandatory) : each example script is sending an email to a recipient. This is the variable used for that, so redefine it to specify your own email address.
  • $sender (optional) : the sender's email address, which can be a completely invented address. Specify false if you want to use the sendmail_from setting from your php.ini file.

Directory data/

Contains files that are used as attachments by the attachments.Php example script.

Directory Images/

Contains two images that are embedded in the html contents of several example scripts.

File mail.html

Html file that contains mail contents used by the external-html.php example script.

Example scripts

textonly.php

Sends an email with only a text part (no html contents).

text-and-html.php

Sends an email with both text and html parts.

embedded-images.php

Sends an email containing embedded images. Html contents are given by a string.

external-html.php

Sends an email whose html contents come from an external file, mail.html. The html contents reference two embedded images.

attachments.php

Sends an email with embedded images and attachments (coming from the data/ directory).


  Files folder image Files  
File Role Description
Files folder imageexamples (8 files, 2 directories)
Accessible without login Plain text file LICENSE Lic. License text
Plain text file Mail.phpclass Class Class source
Accessible without login Plain text file NOTICE Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Plain text file Regex.class.php Class Class source

  Files folder image Files  /  examples  
File Role Description
Files folder imagedata (2 files)
Files folder imageimages (2 files)
  Accessible without login Plain text file attachments.php Example Example script
  Accessible without login Plain text file embedded-images.php Example Example script
  Accessible without login Plain text file examples.inc.php Aux. Auxiliary script
  Accessible without login Plain text file external-html.php Example Example script
  Accessible without login HTML file mail.html Data Auxiliary data
  Accessible without login Plain text file README.md Doc. Documentation
  Accessible without login Plain text file text-and-html.php Example Example script
  Accessible without login Plain text file textonly.php Example Example script

  Files folder image Files  /  examples  /  data  
File Role Description
  Accessible without login Plain text file file1.txt Doc. Documentation
  Accessible without login Plain text file file2.txt Doc. Documentation

  Files folder image Files  /  examples  /  images  
File Role Description
  Accessible without login Image file image1.jpg Icon Icon image
  Accessible without login Image file image2.jpg Icon Icon image

 Version Control Unique User Downloads Download Rankings  
 100%
Total:632
This week:1
All time:5,011
This week:158Up
User Ratings User Comments (1)
 All time
Utility:91%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:70%StarStarStarStar
Rank:352
 
Thats a good class, nice job ;-)
6 years ago (Josť Filipe Lopes Santos)
80%StarStarStarStarStar