I am trying to send Newsletter to a set of recipients using below code
ResourceResolver resolver = resourceResolverFactory
.getAdministrativeResourceResolver(null);
Session session = resolver.adaptTo(Session.class);
PageManager pageManager = pageManagerFactory.getPageManager(resolver);
Page page = pageManager.getPage("/content/campaigns/geometrixx/monthly_newsletter");
NewsLetter newsletter = newsletterService.buildNewsletter(page);
MailingList mailingList = newsletterService.createMailingList(
"groupname", session);
newsletter.setMailingList(mailingList);
MailingStatus status = newsletterService.sendNewsletter(newsletter);
The problem i am facing is java code runs without any error and the status received says mail is SENT and haserror is false, but no mail is received.
Any assistance on this would be greatly appreciated.
Solved! Go to Solution.
Newsletter service returns ok, but if the common SMTP setting for your CQ-instance is not set correctly, then the actual mail may not be sent.
Another option you have is to write a custom Java email service as an OSGi and use that to send emails. See http://scottsdigitalcommunity.blogspot.ca/2013/08/creating-aem-applications-that-use.html.
Views
Replies
Total Likes
Newsletter service returns ok, but if the common SMTP setting for your CQ-instance is not set correctly, then the actual mail may not be sent.
Now i am able send email, but that mail content is empty... No newsletter inside email..
Views
Replies
Total Likes
common SMTP settings for CQ-mail service are already set using configuration tab of OSGI console.
Views
Replies
Total Likes