Manual

mail.class.php

mail class

Usage:

{{lang:php}}
// ADVANCED USAGE
$mail = new mail();
$mail->from = 'example@example.si';
$mail->from_name = 'name surname';
$mail->to = 'boris@example.si';
$mail->replay_to = 'example@example.si';
$mail->replay_to_name = 'Editor - example';
$mail->cc = 'you@example.si, igor@example.si, example@example.si';
$mail->bcc = 'you@example.si, igor@example.si, example@example.si';
$mail->charset = 'CP-1250';
$mail->content_type = 'text/html';
$mail->subject = "test mail examplea";
$mail->message = '<html><b>This</b> is <span style="color:green;"><b>green</b></span>.<br><br> LP example</html>';
$mail->send();

// SIMPLE USAGE
$mail = new mail();
$mail->from = 'you@example.si';
$mail->to = 'waaaaa@example.si';
$mail->subject = "naslov";
$mail->message = 'bla bla bla';
$mail->send();

// ATTACHMENT
$mail = new mail();
$mail->from = 'example@example.si';
$mail->from_name = 'example';
$mail->to = 'example@example.si';
$mail->replay_to = 'example@example.si';
$mail->replay_to_name = 'example';
$mail->bcc = 'you@example.si, igor@example.si, example@example.si';
$mail->subject = "mail attachment example";
$mail->message = '<html><b>This</b> is <span style="color:green;"><b>green</b></span>.<br><br> LP example</html>';
$files[] = Array("file"=>"test.pdf", "name"=>'racun.pdf', "content_type"=>"application/pdf");
$mail->attach($files);
$mail->send();
Try myPortal 2: