Mostrar de forma mas util los horarios por instructor.
[CLab.git] / include / mailer.php
blob3ca9536f23bc725038686a213dacd91b01b458b1
1 <?
2 /**
3 * Mailer.php
5 * The Mailer class is meant to simplify the task of sending
6 * emails to users. Note: this email system will not work
7 * if your server is not setup to send mail.
9 * If you are running Windows and want a mail server, check
10 * out this website to see a list of freeware programs:
11 * <http://www.snapfiles.com/freeware/server/fwmailserver.html>
13 * Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
14 * Last Updated: August 19, 2004
17 class Mailer
19 /**
20 * sendWelcome - Sends a welcome message to the newly
21 * registered user, also supplying the username and
22 * password.
24 function sendWelcome($user, $email, $pass){
25 $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">";
26 $subject = "Jpmaster77's Site - Welcome!";
27 $body = $user.",\n\n"
28 ."Welcome! You've just registered at Jpmaster77's Site "
29 ."with the following information:\n\n"
30 ."Username: ".$user."\n"
31 ."Password: ".$pass."\n\n"
32 ."If you ever lose or forget your password, a new "
33 ."password will be generated for you and sent to this "
34 ."email address, if you would like to change your "
35 ."email address you can do so by going to the "
36 ."My Account page after signing in.\n\n"
37 ."- Jpmaster77's Site";
39 return mail($email,$subject,$body,$from);
42 /**
43 * sendNewPass - Sends the newly generated password
44 * to the user's email address that was specified at
45 * sign-up.
47 function sendNewPass($user, $email, $pass){
48 $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">";
49 $subject = "Jpmaster77's Site - Your new password";
50 $body = $user.",\n\n"
51 ."We've generated a new password for you at your "
52 ."request, you can use this new password with your "
53 ."username to log in to Jpmaster77's Site.\n\n"
54 ."Username: ".$user."\n"
55 ."New Password: ".$pass."\n\n"
56 ."It is recommended that you change your password "
57 ."to something that is easier to remember, which "
58 ."can be done by going to the My Account page "
59 ."after signing in.\n\n"
60 ."- Jpmaster77's Site";
62 return mail($email,$subject,$body,$from);
66 /* Initialize mailer object */
67 $mailer = new Mailer;