Git Product home page Git Product logo

helpy_imap's People

Contributors

crm114 avatar gossnj avatar phil8900 avatar scott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

helpy_imap's Issues

Unable to connect to gmail IMAP

I noticed that this is no longer able to connect to gmail IMAP. I don't think this is directly a problem with the gem, and more an issue with ruby 2.4/2.5 being able to connect due to an openSSL problem.

ArgumentError: invalid byte sequence in UTF-8 when sending ISO 8859-X encoded Mails

Hey,
I encountered a strange error while using helpy_imap that occurs when users send ISO 8859-X encoded Mails. When fetching those Mails, an <ArgumentError: invalid byte sequence in UTF-8>` error pops up and the ticket is either empty or not showing up at all.
I have seen this error with Latin-1 (ISO 8859-1) and Latin-2 (ISO 8859-2) and therefore I suspect it might also occur for other versions of the ISO 8859 standard.

The odd thing is that when I was looking for that error I took a look at entity.encoding.name which is used in the encode_entity(entity) method and it was shown as ASCII-8BIT instead of ISO 8859-1 as I would have expected.

I'll investigate further :)

EDIT: I took a closer look, and I analyzed @email.header.charset and I got UTF-8 even for Latin-1/Latin-2 mails, so that didn't really help.

E-Mail that's not multipart produces `NoMethodError`

Hello!
I newly got up and running with a DigitalOcen OCI of Helpy and started configuring the IMAP Email settings.

The system is preconfigured with:

$ ruby -v
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux]
$ rails -v
Rails 4.2.11.1
$ rake --version
rake, version 12.3.2
$ rvm --version
rvm 1.29.7 (latest)

After Helpy correctly loaded the authors of unread messages in the inbox I knew the connection worked correctly but no tickets appeared. Same with test mails sent from my Thunderbird client - which had been pretty simple test strings without any markup of which Thunderbird creates non-multipart emails.

Calling RAILS_ENV=production rake helpy:mailman in foreground it gave me the following lines including the error:

I, [2019-04-08T11:43:41.415479 #1560]  INFO -- : Polling disabled. Checking for messages once.
I, [2019-04-08T11:43:42.283026 #1560]  INFO -- : Got new message from '[email protected]' with subject 'Support Test'.
#<NoMethodError: undefined method `body' for nil:NilClass>

Since the obvious relation to the emails body I added some markup to the test email et voilà: a ticket was created and no error message was printed.

I started looking around for the string body in the source files (I read Ruby/Rails for the first time) and found the class BodyCondition in /home/deploy/.rvm/gems/ruby-2.4.5/gems/mailman-0.7.3/lib/mailman/route/conditions.rb
providing the method match(message). This method does a check if the passed message is multipart.
If it is and a body part is found that matches some criteria, this part is stored in a variable and returned. If the message is not multipart on the other hand, the message.body.decoded is passed to the same method matching but neither is a return value stored nor returned.

That's all for now and I hope my findings and explanations will help you reproduce the bug. Or point out something I missed instead!

Kind regards,
Leon

Received emails do not get transformed to tickets

For some reasons ( I'm not a Ruby expert so I might be missing something obvious ) when helpy:mailman tries to process a mail I get the following error:

#<TypeError: no implicit conversion of Symbol into Integer>

following all the output:

$ RAILS_ENV=production rake  helpy:mailman                                                      
I, [2018-12-06T11:12:58.807509 #21696]  INFO -- : Mailman v0.7.3 started
I, [2018-12-06T11:12:58.807609 #21696]  INFO -- : IMAP receiver enabled ([email protected]@mailserver.ssd.it).
I, [2018-12-06T11:12:58.827376 #21696]  INFO -- : Polling disabled. Checking for messages once.
I, [2018-12-06T11:12:59.469204 #21696]  INFO -- : Got new message from '[email protected]' with subject 'sdfg'.
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /usr/local/rvm/gems/ruby-2.3.3@helpy/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:274:in `block in require'
#<TypeError: no implicit conversion of Symbol into Integer>

it fails the require method so i guess it's having problems loading the module,
if you could shed some light I would appreciate.

Cloudinary is used when credentials are filled in even when it is disabled

Hey,
as I have some issues with attachments not getting added to the tickets in helpy, I wanted to try Cloudinary to see if that fixes the issue.
I filled in my Cloudinary credentials and performed some tests, but the problem persisted so I decided to disable Cloudinary again by using the slider button in the settings. As I was lazy and probably want to turn Cloudinary back on at some point later, I left my details in there.

def cloudinary_enabled? AppSettings['cloudinary.cloud_name'].present? && AppSettings['cloudinary.api_key'].present? && AppSettings['cloudinary.api_secret'].present? end

just checks if the credentials are filled in, but it doesn't check if AppSettings['cloudinary.enabled'] is set at all.

This is probably also present in helpy, and not only in helpy_imap.

Best regards,
Philip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.