Comments (12)
Hi,
can you post the swiftmailer-sections and the azine-email-bundle-sections from your config.yml and from your config_prod.yml?!
Cheers,
d.
from email-bundle.
`
*swiftmailer:
- default_mailer: default
- mailers:
-
default:
-
transport: "%mailer_transport%"
-
host: "%mailer_host%"
-
username: "%mailer_user%"
-
password: "%mailer_password%"
-
spool: { type: memory }
-
`
port: 587
email bundle :
`
azine_email:
# the class of your implementation of the RecipientInterface
recipient_class: Shaygan\UserBundle\Entity\User # Required
# the fieldname of the boolean field on the recipient class indicating, that a newsletter should be sent or not
recipient_newsletter_field: newsletter
# the service-id of your implementation of the nofitier service to be used
notifier_service: azine_email.example.notifier_service
# the service-id of your implementation of the template provider service to be used
template_provider: azine_email.example.template_provider # Required
# the service-id of the implementation of the RecipientProviderInterface to be used
recipient_provider: azine_email.default.recipient_provider
# the service-id of the mailer service to be used
template_twig_swift_mailer: azine_email.default.template_twig_swift_mailer
no_reply: # Required
# the no-reply email-address
email: [email protected] # Required
# the name to appear with the 'no-reply'-address.
name: notification daemon # Required
# absolute path to the image-folder containing the images used in your templates.
image_dir: %kernel.root_dir%/../vendor/azine/email-bundle/Azine/EmailBundle/Resources/htmlTemplateImages/
# list of folders from which images are allowed to be embeded into emails
allowed_images_folders: []
# newsletter configuration
newsletter:
# number of days between newsletters
interval: 14
# time of the day, when newsletters should be sent, 24h-format => e.g. 23:59
send_time: 10:00
# templates configuration
templates:
# wrapper template id (without ending) for the newsletter
newsletter: AzineEmailBundle::newsletterEmailLayout
# wrapper template id (without ending) for notifications
notifications: AzineEmailBundle::notificationsEmailLayout
# template id (without ending) for notification content items
content_item: AzineEmailBundle:contentItem:message
# the parameter to be used do identify campaigns in urls
campaign_param_name: pk_campaign # defaults work with piwik, but you can change them to work with adWords
# the parameter to be used do identify campaign-keywords in urls
campaign_keyword_param_name: pk_kwd # defaults work with piwik, but you can change them to work with adWords
# number of days that emails should be available in web-view
web_view_retention: 90
# the service-id of your implementation of the web view service to be used
web_view_service: azine_email.example.web_view_service
`
from email-bundle.
Hi,
in your config.yml you configure only the "default" swiftmailer. So your change to use immediateMailer: "@mailer"
is correct.
For the azine_email:
-part: you only need to write the stuff in your config.yml that you want to override. I see most of what you use are defaults.
Can you post relevant log-output from Symfony => app/logs/prod.log or app/logs/dev.log and from your web-server log. Are there any exceptions in the logs?
Did you create the notification- and the sent_email-table?
Does your implementation of getNewsletterRecipientIDs
in your RecipientProviderInterface return some users?
You write that you want to send notifications. emails:sendNewsletter
will send a newsletter, not notifications. Notifications are sent with the command emails:sendNotifications
if any Notifications exist in the notification-table in your database.
Cheers,
D.
from email-bundle.
thank you !
i see this in my log :
[2015-02-12 10:33:45] app.WARNING: The newsletter for 'admin [email protected]' has not been sent. It would have been empty. {"subject":"_az.email.newsletter.subject","contentItems":[]} []
by the way
how can i send notification ?
from email-bundle.
Hi,
you're welcome.
To send a notification, create a notification-entity and run the emails:sendNotifications
command.
Cheers,
d.
from email-bundle.
thanks again !
but my problem not solve yet !
i still need send
from email-bundle.
thanks again !
but my problem not solve yet !
i still need send Newsletter
[2015-02-12 10:33:45] app.WARNING: The newsletter for 'admin [email protected]' has not been sent. It would have been empty. {"subject":"_az.email.newsletter.subject","contentItems":[]} []
from email-bundle.
Well as the log says. As the newsletter would have been empty, it was not sent.
To change this, you need to implement a logic to create some content items (https://github.com/azine/email-bundle#2-the-content-item-templates) for your recipents.
You must implement your version of AzineNotifierService.
ContentItems that are the same for all recipients => Azine\EmailBundle\Services.AzineNotifierService::getNonRecipientSpecificNewsletterContentItems()
ContentItems that are different for each recipient => Azine\EmailBundle\Services.AzineNotifierService::getRecipientSpecificNewsletterSubject()
See ExampleNotifierService.php for an example what you should/could do in those functions.
Cheers,
d.
from email-bundle.
PS: I updated the readme.md => https://github.com/azine/email-bundle#customise-the-content-of-you-emails
from email-bundle.
thanks .
i will test it hope to figure out how to use this magnificent bundle .
if so i will help improve documents .
from email-bundle.
hi
thanks for this magnificent bundle
there is one more thing
Variable "username" does not exist in "AzineEmailBundle::baseEmailLayout.tx
t.twig" at line 6
where should i pass username Variable to template ?
from email-bundle.
Hi,
I removed this impediment/requirement from the baseEmailLayout.*.twig files. With the "head" version of the bundle you don't need to define the username anymore.
Your questions suggests, that you did not (yet) create your own sub-template. In the emails you'd send, there would be a "default-header-section" saying "Add some content here". I don't think you want that. ;-)
You should create you own .html.twig and .txt.twig template that outputs your content(header). See
the two "exampleEmailLayout.*.twig"-files I just added to the bundle.
Cheers,
d.
PS: I'd be happy to hear if/when you succeeded with everything. And feedback on what needs more documentation is also welcome.
from email-bundle.
Related Issues (12)
- README provides incorrect instructions HOT 1
- sendTestEmailAction() limited to .txt.twig HOT 2
- Dependency on FOSUserBundle could be make optional HOT 3
- Examples HOT 7
- services.yml incompatible with Symfony 3.3.6 HOT 2
- Support for Symfony 4 HOT 1
- flex recipe HOT 1
- Upgrade to Swiftmailer 6 HOT 1
- Ideas for extending SendEmail/Notification Entities HOT 4
- LICENSE HOT 1
- Bundle is not compatible with Symfony Flex HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from email-bundle.