vlibMimeMail

vLIB logo

1. Synopsis

Example

   include "./vLIB/vlibMimeMail.php";
   $htmlbody = "<html>\n<body>\nHello test!...\n\n</body>\n</html>";
   $mail = new vlibMimeMail; // create the mail
   $mail->to('to_example@example.com', 'Recipient 1');
   $mail->from('sender@example.com', 'Sender');
   $mail->subject("the subject of the mail");
   $mail->body("Hello test!... in plain text"); // set the body in plain text
   $mail->htmlBody($htmlbody); // set the body in html format
   $mail->cc("cc_example@example.com", 'Recipient 2');
   $mail->bcc("bcc_example@example.com", 'Recipient 3');
   $mail->priority(1); // set the priority to Highest
   $mail->attach("example.doc"); // attach word doc

   $mail->send(); // send the mail
   print("Message sent:<pre>".$mail->get()."</pre>");


If everything goes well, a mail should be sent to the recipients and you should see a page with the mail details.