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 »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • PHP-based solution for the return channel
Pages: 1 2 3 [4] 5

Author Topic: PHP-based solution for the return channel  (Read 36109 times)

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
December 16, 2009, 07:08:55 am
Quote from: seashell on December 15, 2009, 06:42:20 am
Fatal error: Uncaught exception 'Exception' with message 'Unknown protocol ' in /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Mailing/MailStore.php:83

Yeah, this means that it does not have any setting at all.

Quote
THe question I have is.... as I'm using multisites, and therefore the db prefix for my joomla install isn't the default jos_, it's now site1_ or something... would that affect civicrm?

It shouldn’t affect CiviCRM (as long as CiviCRM’s tables have the expected names), but the if you’re using multisite CiviCRM, it might. Can you check whether the civicrm_mail_settings table holds the right entry/entries?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

seashell

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
Re: PHP-based solution for the return channel
December 16, 2009, 10:32:51 am
mysql> select protocol, domain, name, is_default from civicrm_mail_settings;
+----------+------------+------------------+------------+
| protocol | domain     | name             | is_default |
+----------+------------+------------------+------------+
| NULL     | FIXME.ORG  | default          |          0 |
| 3        | testland.com | Development Test |          1 |
+----------+------------+------------------+------------+

here's the result. the protocol of the default email account is 3, which I assume is the code for pop3.

is there anything in the civicrm code which assumes the db prefixes are the default jos_ ?

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
December 18, 2009, 07:21:24 am
Quote from: seashell on December 16, 2009, 10:32:51 am
mysql> select protocol, domain, name, is_default from civicrm_mail_settings;
+----------+------------+------------------+------------+
| protocol | domain     | name             | is_default |
+----------+------------+------------------+------------+
| NULL     | FIXME.ORG  | default          |          0 |
| 3        | testland.com | Development Test |          1 |
+----------+------------+------------------+------------+

here's the result. the protocol of the default email account is 3, which I assume is the code for pop3.

Right. You can also check whether the civicrm_option_value table is properly seeded:

Code: [Select]
mysql> select value, ov.label from civicrm_option_value ov join civicrm_option_group og on (ov.option_group_id = og.id) where og.name = 'mail_protocol';
+-------+----------+
| value | label    |
+-------+----------+
| 1     | IMAP     |
| 4     | Localdir |
| 2     | Maildir  |
| 3     | POP3     |
+-------+----------+
4 rows in set (0.00 sec)

Quote
is there anything in the civicrm code which assumes the db prefixes are the default jos_ ?

No, but we assume that CiviCRM’s tables are prefixed civicrm_ – is your CiviCRM install using other table names?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

seashell

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
Re: PHP-based solution for the return channel
December 18, 2009, 10:54:01 am
That query returns the proper values for protocol settings, so everything seems fine there.

the civicrm_ prefix tables are all fine. I was only worried about the regular tables, but that seems to be irrelevant, since civiccrm uses their own prefixes (like a clever little component).

Somehow, the protocol is set, but the value of it isn't reaching the test script I'm using:

http://*server*/joomla/administrator/components/com_civicrm/civicrm/bin/EmailProcessor.php?name=*user*&pass=*pass*&key=4a1dbeb6eb3452b99bb3751d6c495c17&emailtoactivity=1

(user and pass have been replaced, obviously)

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
December 21, 2009, 06:54:15 am
Ok, I took a look at bin/EmailProcessor.php and it seems it’s not fetching the default settings, but rather tries to use each set of settings. Can you try deleting  the non-default row from civicrm_mail_settings and try again?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

sandman

  • Guest
Re: PHP-based solution for the return channel
December 22, 2009, 03:31:14 am
Hmm. It seems I have exactly the same problem. I'll try going through the steps here.

My post was here http://forum.civicrm.org/index.php/topic,11391.0.html

Thanks

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
December 23, 2009, 12:54:48 am
Right, I filed CRM-5563 to track this.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Alan.Guggenheim

  • Guest
Re: PHP-based solution for the return channel
January 04, 2010, 07:07:19 pm
I am trying to setup CiviMail, and I am running into similar problem: email sending is working fine, but CiviMail Processor and EmailProcessor both get errors as tested from url:

connecting to mail.thewoodlandsteaparty.com, authenticating as civimail and selecting INBOX
Fatal error: Uncaught exception 'ezcMailTransportException' with message 'An error occured while sending or receiving mail. Could not read from the stream. It was probably terminated by the host.'
in /< home> civicrm/packages/ezc/Mail/src/transports/transport_connection.php:217 Stack trace: #0 /<home>/drupal/sites/all/modules/civicrm/packages/ezc/Mail/src/transports/imap/imap_transport.php(524): ezcMailTransportConnection->getLine()
#1 /<home>/drupal/sites/all/modules/civicrm/CRM/Mailing/MailStore/Imap.php(61): ezcMailImapTransport->authenticate('<civiacount>', '<civipassword>')
#2 /<home>/drupal/sites/all/modules/civicrm/CRM/Mailing/MailStore.php(62): CRM_Mailing_MailStore_Imap->__construct('mail.thewoodlan...', '<civiacount>', '<civipassword>', false, NULL)
#3 /<home>/drupal/sites/all/modules/civicrm/bin/EmailProcessor.php(74): CRM_Mailing_MailStore::getStore('<Bounce>')
#4 /<home>/drupal/s in /<home>/drupal/sites/all/modules/civicrm/packages/ezc/Mail/src/transports/transport_connection.php on line 217


does not work in POP3 either. using CiviCRM 3.1 beta.
« Last Edit: January 04, 2010, 07:11:15 pm by Alan.Guggenheim »

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
January 11, 2010, 04:01:55 am
Does ‘regular’ POP3/IMAP access (from an email client, for example) to the account works?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Alan.Guggenheim

  • Guest
Re: PHP-based solution for the return channel
January 11, 2010, 11:38:20 am
Yes, it does

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: PHP-based solution for the return channel
January 12, 2010, 02:12:31 am
Hm. The relevant part (packages/ezc/Mail/src/transports/transport_connection.php around line 257) looks as follows:

Code: [Select]
            // in case there is a problem with the connection fgets() returns false
            while ( strpos( $data, self::CRLF ) === false )
            {
                $line = fgets( $this->connection, 512 );

                /* If the mail server aborts the connection, fgets() will
                 * return false. We need to throw an exception here to prevent
                 * the calling code from looping indefinitely. */
                if ( $line === false )
                {
                    $this->connection = null;
                    throw new ezcMailTransportException( 'Could not read from the stream. It was probably terminated by the host.' );
                }

                $data .= $line;
            }

This looks like there’s a problem with connecting between your host and the mailserver.

If you have shell access to your server, you can try using telnet to access POP3/IMAP from there and see whether it can connect properly (telnet mail.thewoodlandsteaparty.com 110 for starters).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Alan.Guggenheim

  • Guest
Re: PHP-based solution for the return channel
January 15, 2010, 05:03:19 pm
Well... Thanks a lot. It helped debug and getting it to work.
There were actually two issues:
1- probably because of cpanel, the user name has to be username@domain name in the mail account instead of just username, and even though the domain name is also entered in the domain field.
2- my password was too long! going to 8 characters fixed it!

Alan Guggenheim



tiborg

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
Re: PHP-based solution for the return channel
June 16, 2010, 04:47:18 am
Hi all,

I have a follow message, but in contact activity not showing the new e-mail.

connecting to pop.gmail.com and authenticating as localhost@tiborg.co.cc fetching 50 messages retrieving message 1 fetching message 1 and putting it in the ignored mailbox got to the end of the mailbox

Why put in the ignored mailbox? Please help the return channel configuration. Where is this how to in documentation?

thank you

tiborg

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: PHP-based solution for the return channel
June 16, 2010, 07:51:45 am

what script are you running that gives this error?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

tiborg

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
Re: PHP-based solution for the return channel
June 16, 2010, 11:06:14 am
i will be using in crontab the wget EmailProcessor script, but now in my browser started this:

localhost/sites/all/modules/civicrm/bin/EmailProcessor.php?name=user&pass=password&key=4361b7fdeeb019012c76099c2595fc3e

thank you

Pages: 1 2 3 [4] 5
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • PHP-based solution for the return channel

This forum was archived on 2017-11-26.