mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
add mailer flex
This commit is contained in:
parent
c65a71d177
commit
863e216fe7
4
.env
4
.env
@ -44,3 +44,7 @@ SUPPORT_EMAIL=YOUR_EMAIL
|
|||||||
###> nelmio/cors-bundle ###
|
###> nelmio/cors-bundle ###
|
||||||
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
|
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
|
||||||
###< nelmio/cors-bundle ###
|
###< nelmio/cors-bundle ###
|
||||||
|
|
||||||
|
###> symfony/mailer ###
|
||||||
|
# MAILER_DSN=smtp://localhost
|
||||||
|
###< symfony/mailer ###
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
"php": ">=7.2.5",
|
"php": ">=7.2.5",
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
|
"ext-json": "*",
|
||||||
"composer/package-versions-deprecated": "1.11.99.1",
|
"composer/package-versions-deprecated": "1.11.99.1",
|
||||||
"doctrine/annotations": "^1.12",
|
"doctrine/annotations": "^1.12",
|
||||||
"doctrine/doctrine-bundle": "^2.3",
|
"doctrine/doctrine-bundle": "^2.3",
|
||||||
@ -54,11 +55,11 @@
|
|||||||
"symfony/flex": "^1.3.1",
|
"symfony/flex": "^1.3.1",
|
||||||
"symfony/form": "5.2.*",
|
"symfony/form": "5.2.*",
|
||||||
"symfony/framework-bundle": "5.2.*",
|
"symfony/framework-bundle": "5.2.*",
|
||||||
|
"symfony/mailer": "5.2.*",
|
||||||
"symfony/proxy-manager-bridge": "5.2.*",
|
"symfony/proxy-manager-bridge": "5.2.*",
|
||||||
"symfony/swiftmailer-bundle": "^3.5",
|
"symfony/swiftmailer-bundle": "^3.5",
|
||||||
"symfony/twig-bundle": "5.2.*",
|
"symfony/twig-bundle": "5.2.*",
|
||||||
"symfony/yaml": "5.2.*",
|
"symfony/yaml": "5.2.*"
|
||||||
"ext-json": "*"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/doctrine-fixtures-bundle": "^3.4",
|
"doctrine/doctrine-fixtures-bundle": "^3.4",
|
||||||
|
169
composer.lock
generated
169
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "76574cee43242167355502c759b6260c",
|
"content-hash": "9a37fb1f1119669bc5d2ebb272491699",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/package-versions-deprecated",
|
"name": "composer/package-versions-deprecated",
|
||||||
@ -4246,6 +4246,170 @@
|
|||||||
],
|
],
|
||||||
"time": "2021-02-18T22:42:36+00:00"
|
"time": "2021-02-18T22:42:36+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/mailer",
|
||||||
|
"version": "v5.2.7",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/mailer.git",
|
||||||
|
"reference": "c50b304246e56c8574c203bce440f0eafb107ae9"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/mailer/zipball/c50b304246e56c8574c203bce440f0eafb107ae9",
|
||||||
|
"reference": "c50b304246e56c8574c203bce440f0eafb107ae9",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"egulias/email-validator": "^2.1.10|^3",
|
||||||
|
"php": ">=7.2.5",
|
||||||
|
"psr/log": "~1.0",
|
||||||
|
"symfony/event-dispatcher": "^4.4|^5.0",
|
||||||
|
"symfony/mime": "^5.2.6",
|
||||||
|
"symfony/polyfill-php80": "^1.15",
|
||||||
|
"symfony/service-contracts": "^1.1|^2"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"symfony/http-kernel": "<4.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/amazon-mailer": "^4.4|^5.0",
|
||||||
|
"symfony/google-mailer": "^4.4|^5.0",
|
||||||
|
"symfony/http-client-contracts": "^1.1|^2",
|
||||||
|
"symfony/mailchimp-mailer": "^4.4|^5.0",
|
||||||
|
"symfony/mailgun-mailer": "^4.4|^5.0",
|
||||||
|
"symfony/mailjet-mailer": "^4.4|^5.0",
|
||||||
|
"symfony/messenger": "^4.4|^5.0",
|
||||||
|
"symfony/postmark-mailer": "^4.4|^5.0",
|
||||||
|
"symfony/sendgrid-mailer": "^4.4|^5.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Mailer\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Helps sending emails",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/mailer/tree/v5.2.7"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-04-23T11:25:09+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/mime",
|
||||||
|
"version": "v5.2.9",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/mime.git",
|
||||||
|
"reference": "64258e870f8cc75c3dae986201ea2df58c210b52"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/mime/zipball/64258e870f8cc75c3dae986201ea2df58c210b52",
|
||||||
|
"reference": "64258e870f8cc75c3dae986201ea2df58c210b52",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2.5",
|
||||||
|
"symfony/deprecation-contracts": "^2.1",
|
||||||
|
"symfony/polyfill-intl-idn": "^1.10",
|
||||||
|
"symfony/polyfill-mbstring": "^1.0",
|
||||||
|
"symfony/polyfill-php80": "^1.15"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"egulias/email-validator": "~3.0.0",
|
||||||
|
"phpdocumentor/reflection-docblock": "<3.2.2",
|
||||||
|
"phpdocumentor/type-resolver": "<1.4.0",
|
||||||
|
"symfony/mailer": "<4.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"egulias/email-validator": "^2.1.10|^3.1",
|
||||||
|
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
|
||||||
|
"symfony/dependency-injection": "^4.4|^5.0",
|
||||||
|
"symfony/property-access": "^4.4|^5.1",
|
||||||
|
"symfony/property-info": "^4.4|^5.1",
|
||||||
|
"symfony/serializer": "^5.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Mime\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Allows manipulating MIME messages",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"mime",
|
||||||
|
"mime-type"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/mime/tree/v5.2.9"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-05-16T13:07:46+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
"version": "v5.2.4",
|
"version": "v5.2.4",
|
||||||
@ -6683,7 +6847,8 @@
|
|||||||
"platform": {
|
"platform": {
|
||||||
"php": ">=7.2.5",
|
"php": ">=7.2.5",
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-iconv": "*"
|
"ext-iconv": "*",
|
||||||
|
"ext-json": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.0.0"
|
"plugin-api-version": "2.0.0"
|
||||||
|
3
config/packages/mailer.yaml
Normal file
3
config/packages/mailer.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
framework:
|
||||||
|
mailer:
|
||||||
|
dsn: '%env(MAILER_DSN)%'
|
@ -255,6 +255,7 @@ class PollController extends EmailsController {
|
|||||||
->setKind( $data[ 'kind' ] )
|
->setKind( $data[ 'kind' ] )
|
||||||
->setCustomUrl( $data[ 'custom_url' ] );
|
->setCustomUrl( $data[ 'custom_url' ] );
|
||||||
if ( count( $data[ 'allowed_answers' ] ) ) {
|
if ( count( $data[ 'allowed_answers' ] ) ) {
|
||||||
|
// TODO check this one
|
||||||
$newpoll->setAllowedAnswers( $data[ 'allowed_answers' ] );
|
$newpoll->setAllowedAnswers( $data[ 'allowed_answers' ] );
|
||||||
}
|
}
|
||||||
$expiracyCalculated = $newpoll->addDaysToDate( new DateTime(),
|
$expiracyCalculated = $newpoll->addDaysToDate( new DateTime(),
|
||||||
@ -287,10 +288,11 @@ class PollController extends EmailsController {
|
|||||||
|
|
||||||
// emails
|
// emails
|
||||||
$newpoll->setMailOnComment( true );
|
$newpoll->setMailOnComment( true );
|
||||||
if ( isset( $data[ 'isOwnerNotifiedByEmailOnNewVote' ] ) ) {
|
$newpoll->setMailOnVote( $data[ 'isOwnerNotifiedByEmailOnNewVote' ] );
|
||||||
|
$newpoll->setMailOnComment( $data[ 'isOwnerNotifiedByEmailOnNewComment' ] );
|
||||||
|
|
||||||
$newpoll->setMailOnVote( $data[ 'isOwnerNotifiedByEmailOnNewVote' ] );
|
|
||||||
}
|
$newpoll->setIsZeroKnowledge( $data[ 'is_zero_knowledge' ] );
|
||||||
$newpoll->setDescription( $data[ 'description' ] );
|
$newpoll->setDescription( $data[ 'description' ] );
|
||||||
$newpoll->setHideResults( false );
|
$newpoll->setHideResults( false );
|
||||||
// possible answers
|
// possible answers
|
||||||
|
@ -66,8 +66,8 @@ class VoteController extends EmailsController {
|
|||||||
$data = $request->getContent();
|
$data = $request->getContent();
|
||||||
$data = json_decode( $data, true );
|
$data = json_decode( $data, true );
|
||||||
|
|
||||||
// var_dump($data);
|
var_dump($data);
|
||||||
// die();
|
die();
|
||||||
|
|
||||||
$owner = new Owner();
|
$owner = new Owner();
|
||||||
$owner
|
$owner
|
||||||
|
File diff suppressed because it is too large
Load Diff
15
symfony.lock
15
symfony.lock
@ -302,6 +302,18 @@
|
|||||||
"symfony/intl": {
|
"symfony/intl": {
|
||||||
"version": "v5.2.4"
|
"version": "v5.2.4"
|
||||||
},
|
},
|
||||||
|
"symfony/mailer": {
|
||||||
|
"version": "4.3",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "master",
|
||||||
|
"version": "4.3",
|
||||||
|
"ref": "15658c2a0176cda2e7dba66276a2030b52bd81b2"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"config/packages/mailer.yaml"
|
||||||
|
]
|
||||||
|
},
|
||||||
"symfony/maker-bundle": {
|
"symfony/maker-bundle": {
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
@ -311,6 +323,9 @@
|
|||||||
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
|
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"symfony/mime": {
|
||||||
|
"version": "v5.2.9"
|
||||||
|
},
|
||||||
"symfony/options-resolver": {
|
"symfony/options-resolver": {
|
||||||
"version": "v5.2.4"
|
"version": "v5.2.4"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user