PHPBuilder - Sending Mail With PHP3 Page 2

RSS Twitter

Sending Mail With PHP3 - Page 2

by: Tim Perdue
July 30, 2000

Basically, you can receive some parameters from a simple form (you can probably handle creating that. If not - take a look at and steal the HTML from the mail archive - you have my blessing).


//$to_email_address - received from the "POST"
//$from_email_address - ditto

//First, validate the addresses using Jons' function
$to_email_array=validateEmail $to_email_address );
$from_email_array=validateEmail $from_email_address );

//Second, test the results and send the message or display
//an error
if (( $to_email_array[0]) && ($from_email_array[0])) {

mail($to_email_address,$subject,$message,'FROM: '.$from_email_address);

} else {


echo "error";

And you're done...
That same little task, were I using $1000 dollar products like Lasso would have required me to install extra software (javamail API + the JDK if I didn't already have it), and would have taken tons of extra code and some Lasso-specific libraries.
Care to guess where I stand on the free software movement?

« Previous Page

Comment and Contribute

Your comment has been submitted and is pending approval.

Tim Perdue



(Maximum characters: 1200). You have characters left.