View Single Post
  #7   hanzy's Rig  
Old 18 Sep 08, 12:43 PM
hanzy's Avatar
hanzy hanzy is offline
Explosive Member
 
Join Date: Dec 2006
Location: Earth ! :)
Posts: 2,285
hanzy is highly Reputablehanzy is highly Reputablehanzy is highly Reputablehanzy is highly Reputablehanzy is highly Reputablehanzy is highly Reputable
Default Re: Sending email using PHP......

View Post
Originally Posted by viridian
Stolen from the Mail manual, shamelessly :-p

<?php
// The message
$message = "Line 1\nLine 2\nLine 3";

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);

// Send
mail('caffinated@example.com', 'My Subject', $message);
?>

You'll need to configure the email server like described below.
PHP: Runtime Configuration - Manual


As of now im stuck on 2 error messages....
SMTP server response: 554 5.7.1 <xyz@abc.com>: Recipient address rejected: Access denied
and

Fatal error: Class 'Mail' not found
trying to figure that out...i guess i need to pass the authentication password along with the script as my smtp server needs authentication for outgoing mails......

@viridian : nothing shamless in what u did , its out there for our reference and usuage thanks.

Reply With Quote