Using CMSMailer

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
alessandra

Using CMSMailer

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Using CMSMailer

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “CMSMS Core”