OpenEMM php class

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

tobiask
Posts: 4
Joined: Wed Apr 23, 2008 2:08 pm

OpenEMM php class

Post by tobiask »

Hi,

I've written a little PHP class that abstracts the webservice interface of OpenEMM and provides the same functionality as native PHP code. Additional, I've implemented a workaround for the missing "updateSubscriber" functionality.

It can be downloaded at http://enarion.net/programming/php/openemm/.

This is the first public release, there might be problems and errors. If you use it, it would be great if you could give some feedback.

Best regards,
Tobias
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Sounds great! BTW, we will introduce a new webservice method "changeSubscriber" to update existing subscribers with release 5.5 or 5.5.1.
OpenEMM Maintainer
tobiask
Posts: 4
Joined: Wed Apr 23, 2008 2:08 pm

Post by tobiask »

Thanks. Would be great to get some feedback from the users.

I know about the "changeSubscriber" method, since I'm the one who proposed it. ;-)
Will this definelly be named "changeSubscriber"? If yes, I would change the name of the php class method to match it.
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

No, updateSubscriber is fine.
OpenEMM Maintainer
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Fix?

Post by maschoff »

We probably do not need updateSubscriber because method addSubscriber offers a fifth boolean parameter called "overwrite" (see documentation). If set to "true" the subscriber will be updated if a corresponding entry exists in the database.

Does this solve your problem?
OpenEMM Maintainer
Jehu
Posts: 9
Joined: Wed Jul 23, 2008 2:15 pm

Question

Post by Jehu »

Hi,

i use this php class for adding/removing subscribers.

But i don't understand how to send the opt-in mail:
Is this triggered automatically for all new users with status 5?
Or must the sending be triggered manually?

Code: Select all

[...]
                $this->openemm->setSubscriberBinding($subscriberId, $list, 5, 'W', 'WS, Opt-In-IP: ' . $_SERVER['REMOTE_ADDR']);
            }

            $sendMailing = $this->openemm->sendMailing(3, 'W', time()+60); // first param (3) ist the mailing "german double opt in"
            if($sendMailing == 1)
            {
                return true;
            }
[...]
I think, it must be triggered manually by sendMailing() because mailingID is needed - right?

So there ist the next question: Why try OpenEMM to send a mail to the initial test-User "mail@yourdomain.com" (which is in status "active") and not to my new users?

Perhaps my questions not only according to PHP-Webservice-Class...

Regards
Jehu
Post Reply