Rockey123
02-08-2010, 01:41 PM
<?php
class Mailer
{
/**
* sendWelcome - Sends a welcome message to the newly
* registered user, also supplying the username and
* password.
*/
function sendWelcome($user, $email, $pass){
include_once 'settings.php';
$from = "From: ".$domain." Info <".EMAIL_FROM_ADDR.">";
$subject = " Welcome ".$user."! ".$domain." registration info";
$body = $user.",\n\n"
."Welcome! You've just registered at ".$domain." "
."with the following information:\n\n"
."Username: ".$user."\n"
."Password: ".$pass."\n\n"
."If you ever lose or forget your password, a new "
."password will be generated for you and sent to this "
."email address, if you would like to change your "
."email address you can do so by going to the "
."My Account page after signing in.\n\n"
."$domain Staff";
return @mail($email,$subject,$body,$from);
}
/**
* sendNewPass - Sends the newly generated password
* to the user's email address that was specified at
* sign-up.
*/
function sendNewPass($user, $email, $pass){
include_once 'settings.php';
$from = "From:".$domain." Password <".EMAIL_FROM_ADDR.">";
$subject = "$user, your new password has been generated at ".$domain." ";
$body = $user.",\n\n"
."We've have generated a new password for you at your "
."request, you can use this new password with your "
."username to log in to our website\n\n"
."Username: ".$user."\n"
."New Password: ".$pass."\n\n"
."It is recommended that you change your password "
."to something that is easier to remember, which "
."can be done by going to the My Account page "
."after signing in.\n\n"
."$domain Staff";
return mail($email,$subject,$body,$from);
}
function sendPlaylist($user, $email, $msg){
include_once 'settings.php';
$from = "From: ".$domain." <".EMAIL_FROM_ADDR.">";
$subject = "$user just share you a playlist from - ".$domain."";
$body ="Hi,\n\n"
."$user has shared this playlist.\n"
."$msg\n\n"
."$domain Staff";
return mail($email,$subject,$body,$from);
}
};
/* Initialize mailer object */
$mailer = new Mailer;
?>
this email what I get.. some string doesn't work..
pardork,
Welcome! You've just registered at with the following information:
Username: pardork
Password: pardork
If you ever lose or forget your password, a new password will be generated for you and sent to this email address, if you would like to change your email address you can do so by going to the My Account page after signing in.
Staff
*note = pardork is example of username & password..
can someone help me fix on this?
class Mailer
{
/**
* sendWelcome - Sends a welcome message to the newly
* registered user, also supplying the username and
* password.
*/
function sendWelcome($user, $email, $pass){
include_once 'settings.php';
$from = "From: ".$domain." Info <".EMAIL_FROM_ADDR.">";
$subject = " Welcome ".$user."! ".$domain." registration info";
$body = $user.",\n\n"
."Welcome! You've just registered at ".$domain." "
."with the following information:\n\n"
."Username: ".$user."\n"
."Password: ".$pass."\n\n"
."If you ever lose or forget your password, a new "
."password will be generated for you and sent to this "
."email address, if you would like to change your "
."email address you can do so by going to the "
."My Account page after signing in.\n\n"
."$domain Staff";
return @mail($email,$subject,$body,$from);
}
/**
* sendNewPass - Sends the newly generated password
* to the user's email address that was specified at
* sign-up.
*/
function sendNewPass($user, $email, $pass){
include_once 'settings.php';
$from = "From:".$domain." Password <".EMAIL_FROM_ADDR.">";
$subject = "$user, your new password has been generated at ".$domain." ";
$body = $user.",\n\n"
."We've have generated a new password for you at your "
."request, you can use this new password with your "
."username to log in to our website\n\n"
."Username: ".$user."\n"
."New Password: ".$pass."\n\n"
."It is recommended that you change your password "
."to something that is easier to remember, which "
."can be done by going to the My Account page "
."after signing in.\n\n"
."$domain Staff";
return mail($email,$subject,$body,$from);
}
function sendPlaylist($user, $email, $msg){
include_once 'settings.php';
$from = "From: ".$domain." <".EMAIL_FROM_ADDR.">";
$subject = "$user just share you a playlist from - ".$domain."";
$body ="Hi,\n\n"
."$user has shared this playlist.\n"
."$msg\n\n"
."$domain Staff";
return mail($email,$subject,$body,$from);
}
};
/* Initialize mailer object */
$mailer = new Mailer;
?>
this email what I get.. some string doesn't work..
pardork,
Welcome! You've just registered at with the following information:
Username: pardork
Password: pardork
If you ever lose or forget your password, a new password will be generated for you and sent to this email address, if you would like to change your email address you can do so by going to the My Account page after signing in.
Staff
*note = pardork is example of username & password..
can someone help me fix on this?