Pain Posted October 23, 2012 Share Posted October 23, 2012 Hello. I've built a mailer class specifically for account activation. <?php class Mail { public $unique; public $subject = "You must activate your account"; public $message = "Please click on the link below to activate your account "; public $headers = "This is automatically generated email, please do not respond to it."; public function sendActivationMail($to) { $this->unique = md5(uniqid(rand())); if (!mail($to, $this->subject, $this->message, $this->headers)) { return false; } else { return true; } } } ?> However i am unable to add property $unique to my message (in this case it is $message). How can i do this? Thanks:] Quote Link to comment Share on other sites More sharing options...
Jessica Posted October 23, 2012 Share Posted October 23, 2012 $this->message .= ' Unique: '.$this->unique; Quote Link to comment Share on other sites More sharing options...
Pain Posted October 23, 2012 Author Share Posted October 23, 2012 Lol, how stupid of me. Thanks:] Quote Link to comment Share on other sites More sharing options...
Jessica Posted October 23, 2012 Share Posted October 23, 2012 No problem BTW, if the problem was because you were trying to use a double-quoted string, use curly braces. $this->message .= " Unique: {$this->unique}"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.