• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: SOLVED Send mail to user when added to admin area SERVER ERR
PostPosted: Wed Aug 01, 2012 7:06 pm 
Offline
Forum Members
Forum Members

Joined: Wed Apr 05, 2006 3:57 pm
Posts: 13
Hi all

First of all I use CMSMS 1.10.3 and I use this UDT with event handler "UserAddPost"
http://wiki.cmsmadesimple.org/index.php/Share_your_tags_here#Sending_a_new_user_his_information_after_adding_him_via_the_Admin_Console

But it gives a server error when adding a new user to the admin panel.

I have so fare figured out that this marked out stop the server error

Code:
if($newuser->email != "" && validate_email($newuser->email)){
  $cmsmailer = $this->GetModuleInstance('CMSMailer');
  $cmsmailer->AddAddress($newuser->email);
  $cmsmailer->SetBody($bodytext);
  $cmsmailer->IsHTML(false);
  $cmsmailer->SetSubject($sitename.' User Account Information');
  $cmsmailer->Send();
}


I tried with just for the UDT

Code:
 
  $cmsmailer = $this->GetModuleInstance('CMSMailer');
  $cmsmailer->AddAddress('somemail@earth.com','tester');
  $cmsmailer->SetBody('<h4>This is a test message</h4>');
  $cmsmailer->IsHTML(true);
  $cmsmailer->SetSubject('Test message');
  $cmsmailer->Send();


And this gives the same error, so it seems like there is something wrong with either the "AddUserPost" event or the mailer.

But so far I had no luck fixing it.

Can any one help?


Last edited by qido on Sun Aug 05, 2012 7:42 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Send mail to user when added to admin area SERVER ERROR
PostPosted: Wed Aug 01, 2012 7:08 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6586
Location: Fernie British Columbia, Canada
There is no $this object when working in a UDT.

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: Send mail to user when added to admin area SERVER ERROR
PostPosted: Wed Aug 01, 2012 7:35 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Fri Nov 30, 2007 9:15 am
Posts: 329
I don't know if you will be able to send the password to users i but wanted to mention the notifications module just in case...
http://dev.cmsmadesimple.org/projects/notifications

Greetings,
Manuel

_________________
Do you like your open source cms? Buy from the CMSMS partners || Donate
(or at least share some knowledge :D >> See some of my stuff )


Top
 Profile  
 
 Post subject: Re: SOLVED Send mail to user when added to admin area SERVER
PostPosted: Sun Aug 05, 2012 7:44 pm 
Offline
Forum Members
Forum Members

Joined: Wed Apr 05, 2006 3:57 pm
Posts: 13
Thx. Moved me in correct direction.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: mobilerq


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner