Page 1 of 1

Using CMSMailer

Posted: Thu Feb 08, 2007 3:24 am
by alessandra
Hi

I want to start off a simple php program which uses CMSMailer but I am not certain how to get it started. I may have to run a "new" command but I'm not exactly sure what or how. This is the code I currently have in a file in the CMSMailer directory which gives an error:

GetModuleInstance('CMSMailer');
  $cmsmailer->AddAddress('testmail@test.com','chieftester');
  $cmsmailer->SetBody('This is a test message');
  $cmsmailer->IsHTML(true);
  $cmsmailer->SetSubject('Test message');
  $cmsmailer->Send();
?>

Error: Using $this when not in object context in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\cmsmadesimple\modules\CMSMailer\testmail.php on line 4

Can anyone help me please.

Thanx
Alessandra

Re: Using CMSMailer

Posted: Fri Feb 09, 2007 3:58 am
by calguy1000
CMSMailer is a module designed for use in other CMS modules.  It won't work well by itself.

However, it is a simple wrapper around phpmailer which is freely available and designed for that.
there's a subdirectory beneath the CMSMailer directory that contains phpmailer in its entirety.