Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Mailer][SendGrid] add support for scheduling delivery viasend_at API parameter#60372

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
MrMitch wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromMrMitch:sendgrid-mailer-date-send-at

Conversation

MrMitch
Copy link

@MrMitchMrMitch commentedMay 7, 2025
edited
Loading

QA
Branch?7.3
Bug fix?no
New feature?yes
Deprecations?no
IssuesN/A
LicenseMIT

This PR adds support for scheduling delivery when using the SendGridAPI transport (with asendgrid+api DSN), by providing a\DateTimeInterface object in aSymfony\Component\Mime\Header\DateHeader namedSend-At.

$email =new \Symfony\Component\Mime\Email();$email->getHeaders()->addDateHeader('Send-At', (new \DateTime())->modify('+3 hours'));

It will be mapped to thesend_at parameter of the[POST] /mail/sendAPI endpoint.

@carsonbotcarsonbot added this to the6.4 milestoneMay 7, 2025
@carsonbotcarsonbot changed the title[Mailer][SendGrid] add support for scheduling delivery via send_at API parameter[Mailer] [SendGrid] add support for scheduling delivery via send_at API parameterMay 7, 2025
@MrMitch
Copy link
Author

Test failures look unrelated

@OskarStarkOskarStark modified the milestones:6.4,7.3May 7, 2025
@OskarStark
Copy link
Contributor

New features need to target the newest branch, which is 7.3

@OskarStarkOskarStark changed the title[Mailer] [SendGrid] add support for scheduling delivery via send_at API parameter[Mailer][SendGrid] add support for scheduling delivery via send_at API parameterMay 7, 2025
}
// the documentation shows parameter names in camelCase but the expected JSON keys should be in snake_case
$payload['send_at'] = $header->getDateTime()->getTimestamp();
} elseif ($header instanceof TagHeader) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hi,thank you for your suggestion.
I didn't want to change too much of the code to facilitate the review process but I'll gladly update the successive conditions if necessary. Is it something you would like me to do in this PR ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's just a suggestion, but since you've added new conditions, this approach might make sense, as it's used in other integrations. I think it's worth waiting to hear and consider other opinions before making a final decision.

@carsonbotcarsonbot changed the title[Mailer][SendGrid] add support for scheduling delivery via send_at API parameter[Mailer] [SendGrid] add support for scheduling delivery via send_at API parameterMay 8, 2025
@MrMitch
Copy link
Author

@OskarStark@bkosun Thank you for your feedback, I've applied all the suggested changes. Let me know if you would like me to make additional changes.

bkosun reacted with thumbs up emoji

@stof
Copy link
Member

Is this Send-At header supported by their SMTP server ?

@MrMitch
Copy link
Author

Hi@stof,

Yes, the Send-At header is supported by their SMTP server as well, as perthe documentation :

You can use theSMTP API header to schedule your emails when sending viaSMTP or ourmail.send API endpoint.

@OskarStarkOskarStark changed the title[Mailer] [SendGrid] add support for scheduling delivery via send_at API parameter[Mailer][SendGrid] add support for scheduling delivery viasend_at API parameterMay 16, 2025
@fabpotfabpot modified the milestones:7.3,7.4May 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@bkosunbkosunbkosun requested changes

@lyrixxlyrixxAwaiting requested review from lyrixx

@ycerutoycerutoAwaiting requested review from yceruto

@chalasrchalasrAwaiting requested review from chalasr

@dunglasdunglasAwaiting requested review from dunglas

@jderussejderusseAwaiting requested review from jderusse

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

6 participants
@MrMitch@OskarStark@stof@bkosun@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp