Giter Club home page Giter Club logo

notifications-php-client's Introduction

notifications-php-client's People

Contributors

acsauk avatar allait avatar andrewl avatar bandesz avatar benthorner avatar blesseddev avatar cooperaj avatar crystalpea avatar danielcarney96 avatar idavidmcdonald avatar imdadahad avatar joesb avatar jonathanglassman avatar karlchillmaid avatar kentsanggds avatar klssmith avatar leohemsted avatar minglis avatar nsmithuk avatar quis avatar richardc0 avatar rjbaker avatar saimaghafoor avatar samuelhwilliams avatar servingupaces avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notifications-php-client's Issues

Documentation: catching exceptions

The README recommends catching Alphagov\Notifications\Exception\NotifyException after trying the sendEmail() method, and then using $e->getCode() and $e->getErrors() to extract the exception info.

However the ->getErrors() method only exists on the ApiException class, so can't be relied on to exist when catching the parent NotifyException, which only has standard RuntimeException methods.

Requirement could not be resolved

Hello,

I wondered if someone could help me with an issue whilst trying to install the PHP client?

I seem to be going around in circles when I'm trying to install the client using composer.

If I run this command composer require php-http/guzzle6-adapter alphagov/notifications-php-client
it says:

/guzzle6-adapter v2.0.1 requires php-http/httplug ^2.0

So I install php-http/httplug ^2.0 and run the command again and it says:

alphagov/notifications-php-client 1.6.2 requires php-http/httplug ^1.0 ->
satisfiable by php-http/httplug[v1.0.0, v1.0.0-RC1, v1.0.0-alpha, v1.0.0-alpha2,
v1.0.0-alpha3, v1.0.0-beta, v1.1.0] but these conflict with your requirements o
r minimum-stability.

How can I install the client? it appears that it is only compatible with httplug v1 but guzzle 6 is only compatible with httplug v2

guzzlehttp/psr7 version incompatible

Hi,

I have been upgrading from v1.6.2 to v4.0.1 and have hit an issue. I have installed via composer and want to use the curl implementation. I can't connect as per the documentation, as the types of the parameters used to instantiate the curl http client do not match. After some digging I have found that the guzzlehttp/psr7 version specified in the composer.json file is too low. The file is set as ^1.2 but you need a version greater than 2. Is this a known issue or is this done in this way for a reason?

Thanks in advance,
Dave

Feature request: option to set email headers

We have seen reports of mail sent via GOV.UK Notify being delivered into spam mailboxes. We can't know exactly what is causing this, but we have identified that the headers of the mail do not identify the mail as having an automated source.

(Some classification systems may treat automated mails, that do not declare themselves, as suspicious.)

It would help to address this if the email facility for GOV.UK Notify was extended to support two additional sender-specified headers.

  1. List-Unsubscribe:

Senders should have the ability to specify a List-Unsubscribe header consisting of one or more comma-sepatated angle-bracket enclosed URLs.

For our purpose we would only need to specify one.

List-Unsubscribe: <https://example.blog.gov.uk/subscribe/[email protected]>

This URL would provide a mechanism for unsubscribe (but would be in addition to unsubscribe links in the body text).

This header would be used both by some email clients to provide easy subscription management, and by email filtering and classification systems.

Technical reference is:
https://tools.ietf.org/html/rfc2369

  1. Auto-Submitted:

Senders should have the ability to specify an Auto-Submitted header with a valid value.

For our purposes "auto-generated".

Auto-Submitted: auto-generated

This header is used by mail processing systems, primarily as a means of avoiding mail-loops caused by auto responders.

Technical reference is:
https://www.iana.org/assignments/auto-submitted-keywords/auto-submitted-keywords.xhtml
https://tools.ietf.org/html/rfc3834#section-5
https://tools.ietf.org/html/rfc5230#page-8

Not using a direct PSR interface in client and instead using a httpplug wrapper around that interface.

if( $config['httpClient'] instanceof HttpClientInterface ){

We're trying to move to using the new 2.1 release of the client but have hit this issue. Our code uses PSR and injects a ClientInterface implementation into the NotifyClient constructor but this fails as it's expecting a HttpClientInterface (as linked above).

The thing is that HttpClientInterface is a direct wrapper, with no additional functionality over, ClientInterface. I'm loathed to bring in httpplug just so I can use this (but will if I have to)

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.