CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail »
  • Using IMAP2SOAP »
  • imap2soap.pl - rev 509 - resubscribe code incorrect?
Pages: [1]

Author Topic: imap2soap.pl - rev 509 - resubscribe code incorrect?  (Read 2646 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
imap2soap.pl - rev 509 - resubscribe code incorrect?
September 05, 2008, 01:14:57 am
Looking at the latest version of imap2soap.pl (Rev 509 at https://svn.civicactions.net/repos/civicrm/scripts) it appears that the resubscribe logic has been copied from that for unsubscribe, but incorrectly transcribed. In particular, the SOAP function being invoked is that for unsubscribing.

Quote
        elsif ($dest eq 'resubscribe')  # or an unsubscription
          {
            while (1) {
              $result =
                $soapClient->mailer_event_unsubscribe($soapKey, $jobId, $qId, $hash);
              last unless $result->fault;

              if ($attempt < 1) {
                &authenticate();
                $attempt++;
                next;
              }
              error "SOAP: $result->faultstring";
              last;
            }
            if ($result->result == 1) {
              verbose "Successful resubscribe event: $verpInfo";
              my $move = $imap->move("$inBox.Processed subscriptions", $msg);
            } else {
              error "Failed resubscribe event: $verpInfo";
              $imap->move("$inBox.Failed", $msg)
                or fatal "Could not move to Failed";
            }

          }

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: imap2soap.pl - rev 509 - resubscribe code incorrect?
September 19, 2008, 10:37:22 pm
Good catch!  Sorry (to all) it took so long to fix - I've been swamped.  Corrected imap2soap.pl (with a few other small tweaks) at: https://svn.civicactions.net/repos/civicrm/scripts/imap2soap.pl

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail »
  • Using IMAP2SOAP »
  • imap2soap.pl - rev 509 - resubscribe code incorrect?

This forum was archived on 2017-11-26.