Repository navigation
feat: send transactional email with emails()->send() #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Silthus
wants to merge
20
commits into
main
Choose a base branch
from
feat/emails-send
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,136
−94
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d06b4cf
feat: send transactional email with emails()->send()
Silthus 45341fa
fix: resolve the email User-Agent default inside the constructor
Silthus 6a732b9
docs: say a status read answers not_found right after a send
Silthus 181ed05
docs: say flag loading still sends the secret key to host
Silthus d5e5a2c
docs: show the proxy setup that keeps the secret key off host
Silthus b870c10
fix: send no retry after the client shut down during the wait
Silthus 15126f7
docs: qualify the Client class in the proxy example
Silthus c989580
fix: wait out the full retry delay when a signal cuts the sleep short
Silthus 6dbca5a
fix: keep the retry deadline on a monotonic clock
Silthus 03090d8
test: the retry wait follows the monotonic timer when the wall clock …
Silthus c034daa
fix: throw an EmailError when the curl extension is missing
Silthus df1d635
test: keep the no-curl test within the line limit
Silthus d96fa5d
fix: read an HTTP-date Retry-After in UTC
Silthus 84e9c9a
fix: stop reading an email reply over 1 MiB
Silthus 6abff5e
fix: clamp a numeric Retry-After before converting it to milliseconds
Silthus 4676fe0
fix(emails): keep a huge Retry-After inside an int on 32-bit PHP
Silthus 6c395aa
fix(emails): keep retry timing inside an int on 32-bit PHP
Silthus 00abb30
fix(emails): escape control characters in logged send warnings
Silthus c0cfc6b
fix(emails): skip the retry wait when the client closed during the re…
Silthus a123195
fix(emails): clamp a Retry-After too long for a float instead of drop…
Silthus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "posthog-php": minor | ||
| --- | ||
|
|
||
| Add transactional email: `$client->emails()->send()` and `PostHog::emails()->send()` queue one email from a template made in PostHog (`template_id`, `template_data`) or from content your code rendered (`template_key`, `subject`, `html` and/or `text`), and `emails()->get()` reads its status. Sending needs a project secret API key (`phs_...`) as `$secretKey`. New client options: `app_host`, `email_request_timeout_ms`, `email_request_max_retries` and `migrated_from`. A failed send throws `PostHog\EmailError`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.