File: use_smtp.php

Recommend this page to a friend!
  Classes of YoungHyeong Ryu  >  PHP Send Mail Class  >  use_smtp.php  >  Download  
File: use_smtp.php
Role: Example script
Content type: text/plain
Description: Send mail using smtp
Class: PHP Send Mail Class
Send email messages with attachments via SMTP
Author: By
Last change:
Date: 5 years ago
Size: 879 bytes



Class file image Download
("Content-Type: text/html; charset=utf-8");
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', On);

$sendmail = new SendMail();

// Send mail using smtp

$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->From ("Yourname<Account@Domain>");
$sendmail->To (preg_split("/[;,]+/", "Account@Domain")); //maill addresses will be split ";" or ","
$sendmail->Priority (3);

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

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

For more information send a message to info at phpclasses dot org.