Jump to content

exception0x876

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

529 profile views
  1. I have upgraded to 5.9.3 today and discovered a bug in the upgrade step components/upgrades/tasks/upgrade5_8_1.php The query that fails there is ALTER TABLE `contact_permissions` CHANGE `client_id` `client_id` INT UNSIGNED NOT NULL It fails with the following error general.ERROR: PDOException: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'client_id' at row 8 in ..../vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 ..../vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 ..../components/upgrades/tasks/upgrade5_8_1.php(87): Minphp\Db\PdoConnection->query('ALTER TABLE `co... ') #2 ..../components/upgrades/tasks/upgrade5_8_1.php(54): Upgrade5_8_1->setContactPermissio nClientId() #3 ..../components/upgrades/upgrades.php(294): Upgrade5_8_1->process('setContact Permi...') #4 .../components/upgrades/upgrades.php(103): Upgrades->processObject(Object(Upg rade5_8_1), NULL) #5 ..../app/controllers/admin_upgrade.php(109): Upgrades->start('5.8.0-b1' , '5.9.3') #6 ..../vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminUpgrade->process( ) #7 ..../index.php(21): Dispatcher::dispatch('/admin/upgrade/...') #8 {main} I have fixed this error by running the following query manually delete cp.* from contact_permissions cp left join contacts c on cp.contact_id=c.id where c.id is null
  2. Ok, as it turned out it was my fault in setting up Blesta support manager departments. I had to turn off the checkbox "Allow only clients to open or reply to tickets" Thanks everyone for assistance!
  3. As it turns out I had already set System.debug to true in config/core.php
  4. Adam, thank you for your advice. I provided the php script just as an example so it is easier to understand what I am trying to achieve. Basically the following does not work cat message.txt | /usr/bin/php plugins/support_manager/pipe.php You can download message.txt in my 1st post attachment. I have set a support department in Blesta and set Email Handling to Piping there. I will try to turn on debug option you mentioned and report the results.
  5. No, I don't use cPanel. I have php binary at /usr/bin/php, I have checked that.
  6. Again I have no problem with sending email from blesta using SMTP, it works fine. What I need is the way to collect incoming emails and convert them to blesta tickets, you know like what is piping is made for. It cannot be done using SMTP as SMTP is for sending mail, not receiving it. The only way to receive email is by using webhooks I described above, and for that I need blesta pipe.php script to actually work instead of silently exiting.
  7. Thanks for the info serge. Licensecart, I am not sure you understood what I am trying to do and what is not working. Let me explain it a bit more. Here is the script that I have for handling mandrill webhook for inbound mail <?php mysql_connect(...); mysql_select_db(....); mysql_query('set names "utf8"'); if (isset($_POST['mandrill_events'])) { $res = json_decode($_POST['mandrill_events']); if (is_array($res)) foreach ($res as $v) { if (is_object($v)) { $p = popen('/usr/bin/php plugins/support_manager/pipe.php', 'w'); fwrite($p, $v->msg->raw_msg); fclose($p); } } } The script basically passes the received message as STDIN to /usr/bin/php plugins/support_manager/pipe.php No error is reported from pipe.php, however the ticket is not created in Blesta Support Manager.
  8. I use SMTP for outgoing mail. However it seems the only way to use it for inbound mail is through inbound webhooks. Could you please link an article explaining how to use IMAP for Mandrill inbound mail if this is possible?
  9. Hello! I am trying to setup inbound email piping to blesta from Mandrill. I've created a php script that catches posted data from Mandrill and parses it, then invokes "/usr/bin/php <full_path_here>/plugins/support_manager/pipe.php" and passes mail contents to STDIN. However I do not see new tickets created. I've attached an example of parsed mail contents that is passed to pipe.php. file.txt
×
×
  • Create New...