WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : XPertMailer - Sends TRUE Mails
Categories : PHP, Mail, SMTP, PHP Classes Click here to Update Your Picture
Tanase Laurentiu Iulian
Date : Jan 08th 2006
Grade : 4 of 5 (graded 4 times)
Viewed : 4432
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Tanase Laurentiu Iulian
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?
/********************************************************************
* XPertMailer is a php class that you can use to send encoded      *
* MIME type e-mail messages (text, HTML, HTML embeded images,      *
* attachments) towards a localhost, client or relay SMTP servers   *
* with optional authorisation                                      *     
* ---------------------------------------------------------------- *
* For more informations, please visit: http://www.xpertmailer.com/ *
********************************************************************/

@set_time_limit(0);
@
error_reporting(E_ALL); // for debugging

// you will need to download the latest version of XPertMailer from
// LINK1http://sourceforge.net/projects/xpertmailer/LINK1
require_once 'XPertMailer.php';

/**
* send a complex mail - text/html format
* with two HTML embeded images and two attachment files
* --------------------------------------
*/

// $mail = new XPertMailer; // <-- by default SMTP_LOCAL_CLIENT
// but you can optionaly use an relay host (name or ip)
$mail = new XPertMailer(SMTP_RELAY, "relay-host-name.com");

// optionaly you can set authentification for relay host
$mail->auth("username", "password");

// optionaly you can set time out for each smtp server connection
$mail->timeout(30);

// optionaly you can set priority high (default is P_NORMAL - normal)
$mail->priority(P_HIGH);

// optionaly you can set from mail address and optionaly from name
$mail->from("my@account.com", "My Name");

// optionaly you can set each header name and value
$header['Cc'] = "example1@domain.com";
$header['Bcc'] = "example2@domain.com";
$header['Reply-To'] = "reply@domain.com";
$header['X-Whatever'] = "description";

// set additional header informations
$mail->headers($header);

// set HTML embedded images name and optionaly you can rename them
// if the file is not in this directory, write the path name
// Attention: do not include path name in the rename
$imgs[] = "image1.jpg";
$imgs['newname.gif'] = "image2.gif";

// attach HTML embedded images
$mail->attach($imgs, ATTACH_HTML_IMG);

// set attachment files name and optional you can rename them
// if the file is not in this directory, write the path name
$file['new.zip'] = "archive1.zip";
$file[] = "archive2.tar.gz";

// attach files
$mail->attach($file, ATTACH_FILE);

// set the HTML message value
// Attention: do not include image path name
$html = '
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<body>
<img src="image1.jpg" border="0"><br>
<b><u><i>next image</i></u></b> :-)<br>
<img src="newname.gif" border="2"><br>
<font color="red">message html red here</font>
</body>
</html>'
;

// send the e-mail and optionaly you can set charset value
// as you can see, the text/plain message is required because
// not all mail clients can currently support HTML messages
$send = $mail->send("expertphp@domain.com", "subject here",
                   
"this is a HTML message", $html, "UTF-8");

// output -->
// compare the result and print a message
echo $send ? "Done." : "Error.";

// some useful for debugging
echo "<br>Server response: ".$mail->response();
?>



Email Class
Categories : PHP, Mail, PHP Classes
Simple Maiing list with newsletter support
Categories : PHP, PHP Classes, Mail
tinySendMail and tinySockMail functions for generating SMTP mail within PHP
Categories : PHP, Mail, SMTP
Password reminder
Categories : PHP, PHP Classes, Databases, MySQL, Mail
file class , uploade file , download file already uploaded on another website
Categories : PHP, PHP Classes, Filesystem, Web Services
PHP Paypal IPN Integration Class v1.0.0
Categories : PHP, PHP Classes, Payment Gateways
crop and resize image class using gd library function
Categories : PHP, PHP Classes, GD image library, Graphics
A Timing Class
Categories : PHP, PHP Classes, Date Time
The class to check load time of your script VERY usefull for relatively slow applications, but not only..
Categories : PHP, PHP Classes, Debugging
Expose - PHP template engine, supports server and client-sided caching,a plugin system, multiple languages, template script language is based on PHP itself.
Categories : PHP, PHP Classes, Templates, Complete Programs
Create HTML forms dynamicly using Javascript & PHP
Categories : PHP, PHP Classes, Java Script
Using this script anyone can easily get a form result to his/her mailbox. You can use this script for any form 2 mail purpose.
Categories : PHP, Mail, Form Processing
RSS parser. Parses RSS into an array. Quick and nasty but does the job. No checking is done for correct Tags, only correct XML. PHP4 needed to display result (uses print_r).
Categories : PHP, XML, PHP Classes, Rich Site Summary (RSS)
Password Creator: This PHP code exmaple shows how to use bitwise operations on a single variable and using it as a flagged variable. The class generates passwords of a given length using specified characters and the flags.
Categories : PHP, PHP Classes, Algorithms, Security
an example of the cyberlib payment class
Categories : PHP, PHP Classes, Ecommerce, Credit Cards