Git Product home page Git Product logo

lexikmailerbundle's People

Contributors

achernev avatar aitboudad avatar blaugueux avatar cedric-g avatar ezonno avatar gilles-g avatar gnat42 avatar ickbinhier avatar jeremyb avatar jsampedro77 avatar lheurt avatar lightglitch avatar mathewpeterson avatar mlelong avatar pbxg33k avatar raneomik avatar rapisarda avatar sdieunidou avatar seblevdev avatar slashfan avatar snoob avatar stephpy avatar wcluijt avatar webcome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lexikmailerbundle's Issues

Template is not defined error

When attempting to preview emails I get errors similar to the following:

Template "content_a87d51ee0ec089fa01a913c06a5559e5" is not defined ().

I see the "setEmailTemplates" method passing "html_content_" and "text_content_" items, but no "content_" to the "isFresh" method in the EmailLoader class.

I do not see where "content_" is being requested from. Am I doing something wrong?

Cache du layout

Lorsque l'on envoie plusieurs mails ayant des layouts différents, le cache de twig fait que le premier layout est appliqué à l'ensemble des mails.

Pour pallier à ce problème, j'ai ajouté $this->templating->clearTemplateCache(); à la méthode loadTemplates de la classe Lexik\Bundle\MailerBundle\Message\MessageRenderer
Je ne suis pas certain que ce soit la meilleure solution, mais elle fonctionne.

Include view part

Is there a way to include a twig view part?

E.G.

{{ include 'CoreBundle:Part:footer.html.twig' }}

buildForm() error into /my-prefix/email/new

Hello,

I installed this bundle to Symfony 2.1, when I want create new email I obtained this error.

Fatal error: Declaration of Lexik\Bundle\MailerBundle\Form\EmailType::buildForm() must be compatible with that of Symfony\Component\Form\FormTypeInterface::buildForm() in vendor/lexik/mailer-bundle-v1.1.0/Lexik/Bundle/MailerBundle/Form/EmailType.php on line 13

Thanks

Regards

The service "lexik_mailer.templating" has a dependency on a non-existent parameter "twig.class".

Hello,
During our migration process from Symfony 2.8.x to Symfony 3.x, while doing a cache:clear we are getting this error :

The service "lexik_mailer.templating" has a dependency on a non-existent parameter "twig.class".

To solve this we must add in your services.xml file at line 36 :
<parameter key="twig.class">Twig_Environment</parameter>

We are using "lexik/mailer-bundle": "dev-master"

Not sure what is wrong here, could you help us with this ?
Best regards

BCC

Is it possible to add multiple BCC addresses into the template seperated by a semicolon?

composer problem by update to version 2.0.0

if i update to version 2.0.0 this is the result.

can you please fix it?

Problem 1
- Conclusion: remove swiftmailer/swiftmailer v5.4.1
- Conclusion: remove symfony/swiftmailer-bundle v2.3.8
- Conclusion: don't install swiftmailer/swiftmailer v5.4.1
- Conclusion: don't install swiftmailer/swiftmailer v5.4.0
- Conclusion: don't install swiftmailer/swiftmailer v4.1.8
- Conclusion: don't install swiftmailer/swiftmailer v5.3.1
- Conclusion: don't install swiftmailer/swiftmailer v5.3.0
- Conclusion: don't install swiftmailer/swiftmailer 4.1.7
- Conclusion: don't install swiftmailer/swiftmailer v5.2.2
- Conclusion: don't install swiftmailer/swiftmailer v5.2.1
- Conclusion: don't install swiftmailer/swiftmailer 4.1.6
- Conclusion: don't install swiftmailer/swiftmailer v5.2.0
- Conclusion: don't install swiftmailer/swiftmailer v5.1.0
- Conclusion: don't install swiftmailer/swiftmailer 4.1.5
- Conclusion: don't install swiftmailer/swiftmailer v5.0.3
- Conclusion: don't install swiftmailer/swiftmailer v5.0.2
- Installation request for symfony/swiftmailer-bundle v2.3.8 -> satisfiable by symfony/swiftmailer-bundle[v2.3.8].
- Installation request for lexik/mailer-bundle v2.0.0 -> satisfiable by lexik/mailer-bundle[v2.0.0].
- symfony/swiftmailer-bundle v2.3.8 requires swiftmailer/swiftmailer >=4.2.0,~5.0 -> satisfiable by swiftmailer/swiftmailer[v5.4.1, v5.0.0, v5.0.1, v5.0.2, v5.0.3, v5.1.0, v5.2.0, v5.2.1, v5.2.2, v5.3.0, v5.3.1, v5.4.0].
- Can only install one of: swiftmailer/swiftmailer[v5.0.0, 4.1.3].
- Can only install one of: swiftmailer/swiftmailer[v5.0.1, 4.1.3].
- lexik/mailer-bundle v2.0.0 requires swiftmailer/swiftmailer ~4.1.3 -> satisfiable by swiftmailer/swiftmailer[4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, v4.1.8].
- Conclusion: don't install swiftmailer/swiftmailer 4.1.4

Sonata Admin integration documentation

Didn't understand why the bundle neglected to integrate with SonataAdmin. Even went so far creating my own services and child controllers, little did i know there was a configuration option available!!

Anyhow, the documentation should probably be tweaked, to include;

You can also integrate the bundle into SonataAdmin:

# app/config/config.yml
lexik_mailer:
    sonata_integration: true  # enable integration (default is false)

SF2.7 - Twig Functions in Layout

Hi there

Since upgrading to symfony 2.7 (beta 2), twig functions such as {{ asset('path/to/file') }) and {{absolute_url('path/to/file')}} don't seem to work when included in thebase layout.

The specific error is the twig function "asset" does not exist".

There does not seem to be a problem when twig functions are included in the email content.

Kind regards
Matt

DEPRECATED

DEPRECATED - The "pattern" option in file "/symfony/vendor/lexik/mailer-bundle/Lexik/Bundle/MailerBundle/Resources/config/routing.xml" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead. -

Called from XmlFileLoader::parseRoute() at line 85
Called from XmlFileLoader::parseNode() at line 61
Called from XmlFileLoader::load() at line 107
Called from FileLoader::import() at line 157
Called from YamlFileLoader::parseImport() at line 93
Called from YamlFileLoader::load() at line 107
Called from FileLoader::import() at line 157
Called from YamlFileLoader::parseImport() at line 93
Called from YamlFileLoader::load() at line 107
Called from FileLoader::import() at line 157
Called from YamlFileLoader::parseImport() at line 93
Called from YamlFileLoader::load() at line 107
Called from FileLoader::import() at line 157
Called from YamlFileLoader::parseImport() at line 93
Called from YamlFileLoader::load() at line 45
Called from DelegatingLoader::load() at line 76
Called from DelegatingLoader::load() at line 54
Called from Router::getRouteCollection() at line 373
Called from Router::getMatcherDumperInstance() at line 288
Called from Router::Symfony\Component\Routing\{closure}()
Called from call_user_func() at line 46
Called from ConfigCacheFactory::cache() at line 302
Called from Router::getMatcher() at line 250
Called from Router::matchRequest() at line 137
Called from RouterListener::onKernelRequest()
Called from call_user_func() at line 61
Called from WrappedListener::__invoke()
Called from call_user_func() at line 164
Called from EventDispatcher::doDispatch() at line 53
Called from EventDispatcher::dispatch() at line 167
Called from ContainerAwareEventDispatcher::dispatch() at line 124
Called from TraceableEventDispatcher::dispatch() at line 3083
Called from HttpKernel::handleRaw() at line 3056
Called from HttpKernel::handle() at line 3207
Called from ContainerAwareHttpKernel::handle() at line 2429
Called from Kernel::handle() at line 30

Update minimum requirement

Lexik mailer is not compatible anymore with version of Symfony < 3 (invalid syntax on services.xml since you have adding the "default" section).

The minimum requirement of symfony dependency is currently invalid since LexikMailer 2.0.9.

  [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]                                        
  Unable to parse file "/symfony/vendor/lexik/mailer-bundle/DependencyInjection/../Resources/config/services.xml".  
                                                                                                                    

                                                                                                                                                                                                              
  [InvalidArgumentException]                                                                                                                                                                                  
  [ERROR 1871] Element '{http://symfony.com/schema/dic/services}defaults': This element is not expected. Expected is ( {http://symfony.com/schema/dic/services}service ). (in /symfony/ - line 41, column 0)  

Check form is submited before validation

Symfony 4 fails with error "Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid()." in Form/Handler/EmailFormHandler.php at line 91.

The following code isn't valid any more:

    public function processForm(FormInterface $form, Request $request)
    {
        $valid = false;
        $form->handleRequest($request);
        if ($form->isValid()) {

The same code is found in LayoutFormHandler.php.

Can't use Twig variable in "fromAddress"

Hi there,

From your documentation, it seems I cannot use a twig var like {{ senderAddress }} in fromAddress field.

I have several deployments of my app, each one has a different sender address and name.

Since I could not find any examples in your code, tests or documentation, I wonder if this is n issue or I just need some guidance.

Thanks for your work,
Luciano

About sonata admin config

Hello,

We are using now your mailer bundle and i was wondering why you don't hide the translation admins on sonata dashboard. Is there a particular reason ?

This can be done using show_in_dashboard option like this :

    <service id="lexik_mailer.admin.layout_translation" class="%lexik_mailer.admin.layout_translation.class%">
        <tag name="sonata.admin" manager_type="orm" group="Autre" show_in_dashboard="false" label="Layouts Translations" label_translator_strategy="sonata.admin.label.strategy.underscore" />

Thanks for your work,
Mickael

Swiftmailer is abandoned... use another mailer tool ?

Swiftmailer is no more supported since november 2021 while it is a dependency of this project.

So, IMHO, this project has 2 now choices: replace Swiftmailer (custom dev, use of Symfony Mailer...) or mark itself as unsupported.

Syntax error on dev-master

Hello,
There is a small syntax error on Form/Type/EmailType.php L65 dev-master branche :

->add('useFallbackLocale', CheckboxType::class, array(

This line must be removed as it is a duplicate of line 60.

Best regards

How do I check the contents?

When blank fields in the form to the admin user to send messages with text:

  • An error occurred while trying to send email: ********* Template "from_name_571110249606f80d350628ff75099ef4" is not defined.
  • Variable "****" does not exist in "html_content_571110249606f80d350628ff75099ef4"

=)))

This?

  1. if($message instanceof ErrorMessageInterface){
  2. "Subject: An exception occurred"

Sender and receiver are the same in error case

When an error occurs, for example (most likely) in a case of a bad twig input, the sender email address used is the admin_email option - the same as the receiver's address.

This seems not ok in some usages of mailing services, such as Mailjet, where you have to configure a unique sender email address, which may be different from the admin_email option ...

Add Flex recipe for default configuration

Would it be possible to add a recipe that adds the default configuration on installation (composer require)?

Currently the installation exists on an exception stating it misses the required configuration, it would be nice to have it succeed without errors.

Issue with form translation

We're developing a website in chinese with the default local being zh_CN. When We try to submit the form to submit a new layout we get the following error message.

String is too long , it can not be more than two characters in length

Upon looking at the error in the form submission it seems that class for chinese lang would always throw an exception. Entity/LayoutTranslation.php has validation on the protected $lang variable to ensure that the lang is always 2 characters. The problem being that the lang code for simplified chinese is zh_CH. Which then throws the validation error.

Is this something that I am doing wrong or is this a bug with the bundle not supporting the 4 character language codes?

Invalid attribute scope

I am upgrading one project from Symfony 2.8 to 3.0 and although this bundle seems to compatible, I am getting the following error:

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
Unable to parse file "/projects/lendable/vendor/lexik/mailer-bundle/DependencyInjection/../Resources/config/services.xml".

Element '{http://symfony.com/schema/dic/services}service', attribute 'scope': The attribute 'scope' is not allowed.

And from what I can see in Symfony docs, it has been deprecated in 2.8 and not supported in 3.0. How do I overcome this issue?

Services are private by default in Symfony 4

To list mails and templates, I had to set lexik_mailer.simple_pager as public.

To edit a mail, I had to set lexik_mailer.form.handler.email as public.

To edit a layout, lexik_mailer.form.handler.layout has to be public.

I admit I don't know if I had to flag them as public in Resources/config/services.xml due to something special in my code (it was written a long time ago by someone else) or if it really is due to services being private by default in Symfony 4.

email/list issue

out of the box I was getting this error:

An exception occurred while executing 'SELECT DISTINCT id_0 FROM (SELECT l0_.id AS id_0, l0_.reference AS reference_1, l0_.description AS description_2, l0_.bcc AS bcc_3, l0_.spool AS spool_4, l0_.headers AS headers_5 FROM lexik_email l0_) dctrn_result ORDER BY reference_1 ASC LIMIT 20 OFFSET 0':

SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'dctrn_result.reference_1' which is not in SELECT list; this is incompatible with DISTINCT

Using symfony 2.8.

Found some ideas to solve it on stack overflow:
http://stackoverflow.com/questions/35670999/doctrine-querybuilder-order-by-clause-is-not-in-select-list

but I figured I shouldn't be playing with the vendor library without first at least speaking the folks behind the bundle to see if I've screwed something up first or if I can help make a patch / fix.

any thoughts?

Adding Attachments

Will there be any support for adding attachments in any upcoming releases as it's not stated in the documentation.

attach file.

hi do you plan to implement any possibility to attach file ?

problem in file LexikMailerBundle/Doctrine/MetadataListener.php

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ContextErrorException: Notice: Undefined index: charset in /var/www/html/vendor/lexik/mailer-bundle/Doctrine/MetadataListener.php:17
Stack trace:
#0 /var/www/html/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php(63): Lexik\Bundle\MailerBundle\Doctrine\MetadataListener->loadClassMetadata(Object(Doctrine\ORM\Event\LoadC
lassMetadataEventArgs))
#1 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(242): Symfony\Bridge\Doctrine\ContainerAwareEventManager->dispatchEvent('loadClassMetada...', Object(Doctrine\ORM\Event
\LoadClassMetadataEventArgs))
#2 /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(332): Doctrine\ORM\Mapping\ClassMetadataFactory->doLoadMetadata(Object(Doctrine\ORM\Mapping\C
lassMetadata), NULL, false, Array)
#3 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(78): Doctrine\Common\Persistence\Mapping\ in /var/www/html/vendor/lexik/mailer-bundle/Doctrine/MetadataListener.php on
line 17

Error using global twig vars

When I use a global twig var in the body of an email I get an error
Variable "var_name" does not exist in "html_content_b5216d8521f8c6164e8f04d8efc4fd66" at line 5

¿Can I use global twig vars in the emails?

Rename Tables

Is it possible to rename the tables? I've tried extending/overriding the bundle and change out the entities with my own, and over-rode the forms but it seems that it is not working properly.

Missing dependencies?

On installation I got some errors related to missing services.

I think the composer.json should require symfony/form as well.

Also: wouldn't it be better to require symfony/twig-bundle instead of twig/twig?

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.