11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 16 • NETWORKINGwww.it-ebooks.info// Message Subject$subject = "Thank you for your inquiry";// E-mail Body$txt = get();// Prepare the Headers$mailheaders = $mimemail->headers($headers);// Create New Instance of Mail Class$email =& Mail::factory('mail');// Send the E-mail!$email->send($recipient, $mailheaders, $message) or die("Can't send message!");Sending an HTML-Formatted E-mailAlthough many consider HTML-formatted e-mail to rank among the Inter<strong>net</strong>’s greatest annoyances,how to send it is a question that comes up repeatedly. Therefore, it seems prudent to offer an exampleand hope that no innocent recipients are harmed as a result.Despite the widespread confusion surrounding this task, sending an HTML-formatted e-mail isactually quite easy. Consider Listing 16-2, which creates and sends an HTML-formatted message.Listing 16-2. Sending an HTML-Formatted E-mail

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!