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
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
Mobile Dev World

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 : Mail-lib provides a simple interface to the sendmail program. Note: you must actually have sendmail on your machine (sorry windows NT users).
Categories : Algorithms, Email, PHP Update Picture
Peter Kovacs
Date : Jan 17th 1999
Grade : Be the 1st to grade this Code Example
Viewed : 7138
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Peter Kovacs
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?php

function send_mail($to_address, $from_address, $subject, $message) {

$path_to_sendmail = "/usr/lib/sendmail";
$fp = popen( "$path_to_sendmail -t", "w");
$num = fputs($fp, "To: $to_address\n");
$num += fputs($fp, "From: $from_address\n");
$num += fputs($fp, "Subject: $subject\n\n");
$num += fputs($fp, "$message");
pclose($fp);
if ($num > 0) {
return 1;
} else {
return 0;
}

}

?>



Protect your mailto: email addresses from bots - pure PHP
Categories : PHP, Email, Security
Solution to those 'tell-a-friend' type email issues
Categories : PHP, Email, Databases, MySQL
PHP MultiList Mailing List Manager
Categories : Email, HTML and PHP, PHP
phpEasyMail: An easy way to send data from HTML-forms via EMail.
Categories : Email, HTML and PHP, Complete Programs, PHP
How to Generate a random 8 character string in php3?
Categories : PHP, Algorithms
Function to convert Arabic numbers into Roman Numerals
Categories : Algorithms, PHP, Date Time
Example of function to send out email if error occurs
Categories : PHP, Email, Debugging, Errors and Logging
PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use!
Categories : HTML and PHP, Email, PHP, Perl, HTML and PHP
validateEmail 2.0 - upgraded version of the old validateEmail function used to validate email addresses via SMTP and regex.
Categories : Email, Regexps, PHP
Broadcast HTML Email
Categories : PHP, Email, MySQL, Databases
POP3 Class
Categories : PHP Classes, PHP, Email
cPanel Email Accounts Creator
Categories : PHP, PHP Classes, Email, Form Processing, Web Services
Customer feedback or simple emailer - A PHP script that enables your visitors to send you emails.
Categories : PHP, Email, Form Processing
Credit Card Identification and Validation Class - The credit_card class provides methods for cleaning, validating and identifying the type of credit card numbers.
Categories : PHP, PHP Classes, Credit Cards, Ecommerce, Algorithms
Library of math functions to expand the functionality of PHP3. Version 1.2.1 fixes a major problem with the gcd function.
Categories : Algorithms, PHP, Math.