PHP Classes

PHP Send Mail Class: Send email messages with attachments via SMTP

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 747 This week: 1All time: 4,488 This week: 560Up
Version License PHP version Categories
send-mail-class 0.6GNU General Publi...5Email, Networking, PHP 5
Description 

Author

This class can send email messages with attachments via SMTP.

It can compose a message with a given subject, sender, recipients, return path address, organization, priority, HTML or text body, and attachment files.

The message is sent via a given SMTP server optionally authenticating with a given user and password.

Picture of YoungHyeong Ryu
  Performance   Level  
Name: YoungHyeong Ryu <contact>
Classes: 3 packages by
Country: South Korea South Korea
Age: 51
All time rank: 9701 in South Korea South Korea
Week rank: 416 Up1 in South Korea South Korea Equal
Innovation award
Innovation award
Nominee: 1x

Example

<?php
header
("Content-Type: text/html; charset=utf-8");
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', On);


include_once
'class.sendmail.php';
$sendmail = new SendMail();

// Set Smtp Infomation as you using _SMTPSend
$sendmail->UseSMTPServer = true; //If you use smtp sert set true, or local php mail function set false
$sendmail->SMTPServer = "SMTP SERVER";
$sendmail->SMTPPort = "SMTP PORT";
$sendmail->SMTPAuthUser = "SMTP AUTH ID";
$sendmail->SMTPAuthPasswd = "SMTP AUTH PASSWORD";
    
$sendmail->charset = 'utf-8';//ecu-kr :korean, iso-2022-jp : japaneses
$sendmail->Subject ("String Subject");
$sendmail->ReplyTo ("String Username<mailAccount@domain>");
$sendmail->From ("String Username<mailAccount@domain>");
$sendmail->To (preg_split("/[;,]+/", "a@domain;b@domain;c@domain"));
$sendmail->Cc (preg_split("/[;,]+/", "cc@domain"));
$sendmail->Bcc (preg_split("/[;,]+/", "bcc@domain"));
$sendmail->Priority (3);


##$sendmail->SetAttach($_FILES["input_file"]);//send file from form file type
$attached = explode(",", "filname1,filename2");//link of file uploaded already
$sendmail->SetAttachPath($attached, "filepath");//

$sendmail->Body ("String Mail Body");

$sendmail->Send();//Send mail


  Files folder image Files  
File Role Description
Plain text file class.sendmail.php Class Send Mail Class using stmp socket and local func. both
Accessible without login Plain text file index.php Example sample
Accessible without login Plain text file use_form_url.php Example sample for sending mail from url
Accessible without login Plain text file use_php_mail.php Example Send mail using php mail function
Accessible without login Plain text file use_smtp.php Example Send mail using smtp

 Version Control Unique User Downloads Download Rankings  
 0%
Total:747
This week:1
All time:4,488
This week:560Up