Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.118.200.109
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
univadmin /
sendgrid-php /
[ HOME SHELL ]
Name
Size
Permission
Action
examples
[ DIR ]
drwxrwxr-x
lib
[ DIR ]
drwxrwxr-x
static
[ DIR ]
drwxrwxr-x
vendor
[ DIR ]
drwxrwxr-x
.editorconfig
135
B
-rw-r--r--
.env.sample
27
B
-rw-r--r--
CHANGELOG.md
38.32
KB
-rw-r--r--
CODE_OF_CONDUCT.md
3.17
KB
-rw-r--r--
CONTRIBUTING.md
5.81
KB
-rw-r--r--
Dockerfile
335
B
-rw-r--r--
FIRST_TIMERS.md
2.85
KB
-rw-r--r--
ISSUE_TEMPLATE.md
740
B
-rw-r--r--
LICENSE
1.07
KB
-rw-r--r--
Makefile
1000
B
-rw-r--r--
PULL_REQUEST_TEMPLATE.md
1.57
KB
-rw-r--r--
README.md
7.55
KB
-rw-r--r--
TROUBLESHOOTING.md
6.08
KB
-rw-r--r--
UPGRADE.md
216
B
-rw-r--r--
USAGE.md
200.9
KB
-rw-r--r--
USE_CASES.md
45.26
KB
-rw-r--r--
composer.lock
72.38
KB
-rw-r--r--
phpcs.xml
10.07
KB
-rw-r--r--
sendgrid-php.php
997
B
-rw-r--r--
twilio_sendgrid_logo.png
14.25
KB
-rw-r--r--
vskubcollegesendmail.php
1.2
KB
-rwxr--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : TROUBLESHOOTING.md
If you have an issue logging into your Twilio SendGrid account, please read this [document](https://sendgrid.com/docs/ui/account-and-settings/troubleshooting-login/). For any questions regarding login issues, please contact our [support team](https://support.sendgrid.com). If you have a non-library Twilio SendGrid issue, please contact our [support team](https://support.sendgrid.com). If you can't find a solution below, please open an [issue](https://github.com/sendgrid/sendgrid-php/issues). ## Table of Contents - [Table of Contents](#table-of-contents) - [Migrating from v2 to v3](#migrating-from-v2-to-v3) - [Continue Using v2](#continue-using-v2) - [Testing v3 /mail/send Calls Directly](#testing-v3-mailsend-calls-directly) - [Error Messages](#error-messages) - [Versions](#versions) - [Environment Variables and Your Twilio SendGrid API Key](#environment-variables-and-your-twilio-sendgrid-api-key) - [Using the Package Manager](#using-the-package-manager) - [Fixing Error 415](#fixing-error-415) - [Viewing the Request Body](#viewing-the-request-body) - [Google App Engine installation](#google-app-engine-installation) - [Verifying Event Webhooks](#signed-webhooks) <a name="migrating"></a> ## Migrating from v2 to v3 In this context, we are referring to the version of the Twilio SendGrid API. Please review [our guide](https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/how_to_migrate_from_v2_to_v3_mail_send.html) on how to migrate from v2 to v3. <a name="v2"></a> ## Continue Using v2 In this context, we are referring to the version of the Twilio SendGrid API. [Here](https://github.com/sendgrid/sendgrid-php/releases/tag/v4.0.4) is the last working version with v2 support. Using composer: ```json { "require": { "sendgrid/sendgrid": "~4.0.4" } } ``` Download packaged zip [here](https://sendgrid-open-source.s3.amazonaws.com/sendgrid-php/versions/sendgrid-php-75970eb.zip). <a name="testing"></a> ## Testing v3 /mail/send Calls Directly [Here](https://sendgrid.com/docs/for-developers/sending-email/curl-examples/) are some cURL examples for common use cases. <a name="error"></a> ## Error Messages Failed requests will always return an error response, including a response code, a message explaining the reason for the error, and a link to any relevant documentation that may help you troubleshoot the problem. To read the error message returned by Twilio SendGrid's API: ```php try { $response = $sendgrid->send($email); print $response->statusCode() . "\n"; print_r($response->headers()); print $response->body() . "\n"; // Twilio SendGrid specific errors are found here } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } ``` You may find complete documentation [here](https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html). <a name="versions"></a> ## Versions We follow the MAJOR.MINOR.PATCH versioning scheme as described by [SemVer.org](http://semver.org). Therefore, we recommend that you always pin (or vendor) the particular version you are working with to your code and never auto-update to the latest version. Especially when there is a MAJOR point release, since that is guaranteed to be a breaking change. Changes are documented in the [CHANGELOG](CHANGELOG.md) and [releases](https://github.com/sendgrid/sendgrid-php/releases) section. <a name="environment"></a> ## Environment Variables and Your Twilio SendGrid API Key All of our examples assume you are using [environment variables](https://github.com/sendgrid/sendgrid-php#setup-environment-variables) to hold your Twilio SendGrid API key. If you choose to add your Twilio SendGrid API key directly (not recommended): `$apiKey = getenv('SENDGRID_API_KEY');` becomes `$apiKey = 'SENDGRID_API_KEY';` In the first case SENDGRID_API_KEY is in reference to the name of the environment variable, while the second case references the actual Twilio SendGrid API Key. <a name="package-manager"></a> ## Using the Package Manager We upload this library to [Packagist](https://packagist.org/packages/sendgrid/sendgrid) whenever we make a release. This allows you to use [composer](https://getcomposer.org) for easy installation. In most cases we recommend you download the latest version of the library, but if you need a different version, please use: ```json { "require": { "sendgrid/sendgrid": "~X.X.X" } } ``` <a name="error-415"></a> ## Fixing Error 415 If you're getting the following error while using this library: `Content-Type should be application/json.` It is most likely due to a linebreak in your API key. Passing your key through `trim` should fix this: `$apiKey = trim($apiKey)` <a name="request-body"></a> ## Viewing the Request Body When debugging or testing, it may be useful to examine the raw request body to compare against the [documented format](https://sendgrid.com/docs/API_Reference/api_v3.html). You can do this right before you call `$response = $sg->send($email);` like so: ```php echo json_encode($email, JSON_PRETTY_PRINT); ``` <a name="GAE-instructions"></a> ## Google App Engine installation Please refer to [`USE_CASES.md`](USE_CASES.md#GAE-instructions) for additional instructions. <a name="signed-webhooks"></a> ## Signed Webhook Verification Twilio SendGrid's Event Webhook will notify a URL via HTTP POST with information about events that occur as your mail is processed. [This](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features) article covers all you need to know to secure the Event Webhook, allowing you to verify that incoming requests originate from Twilio SendGrid. The sendgrid-php library can help you verify these Signed Event Webhooks. You can find the usage example [here](examples/helpers/eventwebhook/example.php) and the tests [here](test/unit/EventWebhookTest.php). If you are still having trouble getting the validation to work, follow the following instructions: - Be sure to use the *raw* payload for validation - Be sure to include a trailing carriage return and newline in your payload - In case of multi-event webhooks, make sure you include the trailing newline and carriage return after *each* event
Close