Giter Site home page Giter Site logo

sendgrid-php-ng's People

Contributors

aqua-ye avatar bburim avatar bliles avatar brandonmwest avatar caseyw avatar cjbuchmann avatar colinmccune avatar dmyers avatar eddiezane avatar f21 avatar heitortsergent avatar japerry avatar jine avatar kander-zz avatar khayong avatar lucasmezencio avatar luizpedone avatar markwilson avatar martyndavies avatar mattketmo avatar motdotla avatar nquinlan avatar pulse00 avatar rbin avatar rtblair avatar sander-bol avatar taz77 avatar theycallmeswift avatar tomashe avatar vladpavlovic avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

sendgrid-php-ng's Issues

PHP 8.1 errors

Errors displayed by V2.0.5 with PHP 8.1

Deprecated function: Return type of SendGrid\Mail\Mail::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 22 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/Mail.php).

Deprecated function: Return type of SendGrid\Mail\Personalization::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 22 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/Personalization.php).

Deprecated function: Return type of SendGrid\Mail\SandBoxMode::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 18 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/SandBoxMode.php).

Deprecated function: Return type of SendGrid\Mail\Category::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 17 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/Category.php).

Deprecated function: Return type of SendGrid\Mail\Subject::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 17 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/Subject.php).

Deprecated function: Return type of SendGrid\Mail\EmailAddress::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 18 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/EmailAddress.php).

Deprecated function: Return type of SendGrid\Mail\Content::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 17 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/Content.php).

Deprecated function: Return type of SendGrid\Mail\Attachment::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 18 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/Attachment.php).

Deprecated function: Return type of SendGrid\Mail\TrackingSettings::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 17 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/TrackingSettings.php).

Deprecated function: Return type of SendGrid\Mail\ClickTracking::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 18 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/ClickTracking.php).

Deprecated function: Return type of SendGrid\Mail\OpenTracking::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 22 of /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/vendor/fastglass/sendgrid/src/Mail/OpenTracking.php).

Incorret filter param

At Email.php on setTemplateId function (after looking on sendgrid smtp api)

public function setTemplateId($templateId) {
    $this->addFilter('templates', 'enabled', 1);
    $this->addFilter('templates', 'template_id', $templateId);

    return $this;
}

I believe that should be "enable" and not "enabled".

Use user/password instead of API key?

Couldn't find this anywhere (probably just missed it while looking through the code)...how do I pass a username/password to the Client instead of an api key? Can I do this and pass an options array? Has this been taken out? Sorry if the answer is obvious, thanks for the help!

Incorrect Client setup method being used in example documentation

Hello, after trying sendgrid/sendgrid i would like to try this library but i can't get it to work. I've installed it with composer require fastglass/sendgrid and it installed just fine. But when running one of your examples it just breaks with this error:

Fatal error: Class 'SendGrid' not found in /srv/http/test/sendgrid-test.php on line 5

I have the needed require statement for vendor. Is there anything i've missed? Does this only work with Drupal?

Incorrect ClientException class being caught in Client::postRequest

Currently, the ClientException class being caught in Client::postRequest method is referenced as:
GuzzleHttp\Exception\ClientException, which is not the correct namespace.

This needs to be either \GuzzleHttp\Exception\ClientException or simply ClientException (to take advantage of the already present use GuzzleHttp\Exception\ClientException statement.

SMTPAPI header was invalid

When I add a template_id it gets posted to SendGrid but SendGrid blocks it from being sent out.
I am getting this:
"This email was not sent because the SMTPAPI header was invalid."

Doesn't really say what is invalid. If I don't include the template_id, the email is sent ok.

Anyone else have this issue?

How is it established? Content-Type

Hi Brady,

Could you please give me a clue on how I can set the 'Content-Type'.

I'm migrating to Sendgrid, the previous function I used is:

mail('[email protected]', 'Example 001', 'Content example', "From: GoldMine WebImport <[email protected]>\r\nContent-Type: text/x-gm-impdata\r\n" )

I tried this configuration with sendgrid and the data for CRM import does not work for me.
$email ->addTo('[email protected]') ->addHeader('Content-Type', 'text/x-gm-impdata') ->setFrom('GoldMine WebImport <[email protected]>') ->setSubject('Example 001') ->setText($Body); $sendgrid->send($email);

Regards

Implement Sendgrid's marketing API

Thanks for writing/maintaining this library!

As far as I can tell, it currently doesn't support Sendgrid's marketing API (adding/removing contacts, managing lists, etc.). Are there plans to add support for that in the future, or will this library stay focused on sending transactional email?

"Fastglass/Sendgrid" Namespace

SendGrid has an official repository using the same PHP namespace as this repo (SendGrid). I've seen the history and understand that they come from the same provenance, but the scope of functionality of the two libraries has diverged. While this package currently represents itself to composer users as a replacement for sendgrid/sendgrid-php, that's misleading as the interface for each is different.

So that users can access both libraries alongside one another easily (without having to maintain a fork of either), I suggest modifying the PSR-4 namespace of this repo. Fastglass/SendGrid seems appropriate to me, as it matches the composer namespace. Here's my first attempt (master...rtblair:master). Happy to submit a PR if you're interested.

Improve error/exception handling

Currently, when a Guzzle ClientException is encountered, the postRequest method outputs an error message and the var_dumps the entire exception.

The exception contains the Request object as well, which itself contains the bearer token for auth to SendGrid. This is a security vulnerability since it exposes the token.

This code never ran previously due to #24 but it will need to be addressed alongside it.

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.