Archive

Posts Tagged ‘php’

NETTUTS : PHP Framework Tutorials 2

December 9, 2008 enrizuu Leave a comment
NETTUTS

NETTUTS

Released in NOV 24th the 3rd part of the SERIES.

Explains how things will fit with one another.

The construction of the FRONT END. To explain you further and scrutinize every line of code.

Here is the link

Happy Coding!!!

Categories: Web Tags: , , , ,

NETTUTS: PHP Framework Tutorials

October 23, 2008 enrizuu Leave a comment
NetTuts

NetTuts

There are a lot of emerging designers and developers in this OPENSOURCE world. Well here is considered one of the big developments today, FRAMEWORKS! Guide to programming nirvana from NETTUTS.

Have you heard NETTUTS. From Envato, they have this series a Framework Tutorials its on its early stages of the tutorials, since they have only two for the moment. Nonetheless, here are the Tutorials

Part1 – http://nettuts.com/php/creating-a-php5-framework-part-1/

Part2 – http://nettuts.com/php/create-a-php5-framework-part-2/

Enjoy the 2 Tutorials I will update you for the rest!

Happy Coding!

Categories: Web Tags: , , , ,

Dynamic Content for PHP MAILER – for GMAIL

September 3, 2008 enrizuu 8 comments

If you are using PHP MAILER class and tired of the same old HTML static blah! blah content. Me and my officemate (give credit…) configured how we can use the same class but passing a dynamic content to that.

function mailer($rdate,$first, $last, $middlename, $emailadd, $message, $username, $password, $ReplyTo, $From, $FromName, $Subject, $AddressTo, $cc){
include(“class.phpmailer.php”);
//include(“class.smtp.php”); // optional, gets called from within class.phpmailer.php if not already loaded

$mail             = new PHPMailer();

$body  = “This is where you can put the dynamic content $variables a lot of $variables”

$mail->IsSMTP();
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = “ssl”;                 // sets the prefix to the servier
$mail->Host       = “smtp.gmail.com”;      // sets GMAIL as the SMTP server
$mail->Port       = 465;                   // set the SMTP port for the GMAIL server

$mail->Username   = $username;  // GMAIL username
$mail->Password   = $password;            // GMAIL password

$mail->AddReplyTo($ReplyTo,”John Doe”);

$mail->From       = $From;
$mail->FromName   = $FromName;

$mail->Subject    = $Subject;

//$mail->Body       = “Hi,<br>This is the HTML BODY<br>”;                      //HTML Body
$mail->AltBody    = “To view the message, please use an HTML compatible email viewer!”; // optional, comment out and test
$mail->WordWrap   = 50; // set word wrap

$mail->MsgHTML($body);

$mail->AddAddress($AddressTo, “John Doe”);

$mail->AddCC($cc,”Server”);

$mail->AddAttachment(“images/phpmailer.gif”);             // attachment

$mail->IsHTML(true); // send as HTML

if(!$mail->Send()) {
echo “Mailer Error: ” . $mail->ErrorInfo;
} else {
echo “Message sent!”;
}
}

This is the actual code that I am using, the variables are defined for its self as you can see. Save this file into something that you are familiar with. When you call this function use this.

$variable = $_REQUEST['textboxname'];

……and the rest of your dynamic content

require(“fileofsomethingthatyouknow.php”);
mailer($receivedate, $firstname, $lastname, $mname, $email, $msg, “youraccount@gmail.com”,”PASSWORD”,”FROM@YOURDOMAIN.com”,”YOUR@YOURDOMAIN.COM”,”Name”,”SUBJECT “, “TOYOURACCOUNT@ACCOUNT.COM”,”CCyouraccount@gmail.com”);

just fill in the blanks and your done.

The red code the: $body; is where you will place the body of the email, TABLE or DIV whatever you want name it. Just put it there, and a several tests to see if your email is neat and beautiful.

Hope this helps on some of your projects. Happy CODING!