Hey Mike or whoever can help,

In the README file it says:
add --with-xsl=[DIR]
to your configure line

What configure line? In what file?
The sites/default/settings.php, htaccess, what file?

Thanks for your time and help.

Comments

Mike Wacker’s picture

Status: Active » Closed (won't fix)

This is more of a PHP issue than a SunMailer issue. It really varies for everyone depending on their OS and/or hosting company.

I will point you to this book page, which deals with a similar problem, installing the GD extension:

http://drupal.org/node/256876 (for Ubuntu, the corresponding package is php5-xsl)

Other than that, the next best resource is the PHP documentation and Google/Bing, as well as maybe asking your hosting company. I will say, though, that the method for the configure line is typically for those who compile PHP from source; I expect there may be a simpler solution in your case.

lost305’s picture

I did the locate file function and found various instances for the XSL and libxslt.

I contacted my hosting company and they said the following:

Steven Gl: Can I ask what instructions are you using?
LOST: SunMailer requires PHP's XSL extension. PHP's XSL documentation is located at:http://www.php.net/manual/en/book.xsl.php Some Linux distributions have a package which will install the XSL module. If not, PHP 5 includes this module by default; to enable it, add --with-xsl=[DIR]to your configure line, where DIR is the libxslt installation directory.
Steven Gl: Hi LOST, thanks so much for your patience. After investigating, this module is already pre-installed on your server. You shouldn't have to install it.
LOST: but is it activated ?
Steven Gl: Yes.
LOST: So I don't have to add --with-xsl=[DIR] to the configure line?
Steven Gl: No, you shouldn't.

I thought I didn't have that installed because I receive the following error when trying to send a newsletter:

The email newsletter currently has no content.

I've checked the cutoff date and it's 10 days ago. Plus I've added new content just to test it and I still receive the NO CONTENT message.

When I send the CUSTOM EMAIL I get this error:

warning: Invalid argument supplied for foreach() in /home/gladiato/public_html/sites/all/modules/sunmailer/sunmailer.module on line 307.

Yet when I click the SEND TEST EMAIL I receive the email. It states the following:

PHPMailer Object
(
[Priority] =3
[CharSet] =utf-8
[ContentType] =text/plain
[Encoding] =8bit
[ErrorInfo] =
[From] =my-address@my-domain.com
[FromName] = My Website
[Sender] =
[Subject] =SunMailer test
[Body] =
[AltBody] =
[WordWrap] =80
[Mailer] =smtp
[Sendmail] =/usr/sbin/sendmail
[PluginDir] =
[Version] =1.73
[ConfirmReadingTo] =
[Hostname] =
[Host] =localhost
[Port] =26
[Helo] =
[SMTPAuth] =1
[Username] =my-login+domain.com
[Password] =my-password
[Timeout] =10
[SMTPDebug] =
[SMTPKeepAlive] =
[smtp] =
[to] =Array
(
[0] =Array
(
[0] =my-test@email.com
[1] =
)

)

[cc] =Array
(
)

[bcc] =Array
(
)

[ReplyTo] =Array
(
)

[attachment] =Array
(
)

[CustomHeader] =Array
(
)

[message_type] =
[boundary] =Array
(
)

[language] =Array
(
)

[error_count] =0
[LE] =

[SMTPSecure] =ssl
)

What do you think I'm doing wrong?

I would really appreciate any help.
Thank you very much for your time.

Mike Wacker’s picture

Then either you have not created any newsletter sections or the views associated with the sections aren't pulling any content. The documentation tells you how to do this.

lost305’s picture

I did. I created a view named published_updates and the filter to be only "node : published : yes" so it can place everything.
I added the published_updates view to the section.
I've checked the date and I posted new nodes to see if they appear.

Nothing. :o(

Any other thoughts?

Thanks for your time.

Mike Wacker’s picture

It's probably high that this is something on your end.

I just repro'd the process you described, and I didn't see anything go wrong. Plus, if a bug like that existed, there would be a lot more traffic on the issue queue.

lost305’s picture

You might be right about that.

Is there anything you can tell me about this error I'm receiving when I try to send out the newsletter...


warning: Invalid argument supplied for foreach() in /home/my-user/public_html/sites/all/modules/sunmailer/sunmailer.module on line 307.

Which is this:

line 307:  foreach ($address_group as $addresses) {
    // Add recipients.
    $mailer->ClearAllRecipients();
    foreach ($addresses as $address) {
      $mailer->AddBCC($address);
    }
    // Send mail.
    $retries = variable_get('sunmailer_retries', 2);
    while ($retries >= 0) {
      if ($mailer->Send()) {
        break;
      }
      $retries--;
      if ($retries >= 0) {
        watchdog('mail', 'Email failed to send (@error), retrying...', array('@error' => $mailer->ErrorInfo), WATCHDOG_WARNING);
      }
      else {
        watchdog('mail', 'Email failed to send (@error), giving up', array('@error' => $mailer->ErrorInfo), WATCHDOG_ERROR);

Thanks again.

lost305’s picture

UPDATE:

I installed SunMailer in another Drupal installation to another domain. I don't receive any errors.
I added all the sections, I subscribed to those sections, and I click preview and send.

I see all the content from the date set forward. It's all there. I click the confirm check box and I hit send.

It takes me to a Reports page (admin/reports/dblog) but I never receive the email in my inbox or spam box.

Any ideas?

I apologize for so many post but I would really like to see this module working.

Thanks for your time, once again.

Mike Wacker’s picture

Is anyone subscribed to the newsletter? What do the statistics say?

lost305’s picture

Yes. I personally subscribed to the newsletter to test it.

Statistics say 1 subscriber, me.

I tried it in HTML and it said 1 HTML
and when it didn't work I tried TEXT, so it said 1 TEXT

Both didn't work.

I receive the test email, though.

Thanks for your time.

lost305’s picture

I would like to state this is the best newsletter module out.

I finally got the SunMailer working. The problem was with my database. I was getting the "user warning: Illegal mix of collations" error. Once I solved that issue it worked like a charm.

Thanks for everything Mike!

lhubbert’s picture

For the past six months, I've been thinking, "I wish I could just send a daily email based on a view." I've been using Notifications but haven't been happy with the sorting and formatting options for our school newsletter.

I found Sunmailer last night and I've been trying to get it going for hours. I have test emails working, custom emails working, but I keep getting "The newsletter has no content." I have the cutoff date set to a week ago, I've got a view set up and assigned to a section (pops up in the autofill when I'm assigning it). Is there some other crucial step I'm missing? A solution to this problem would make 350 public school parents and teachers very happy!

Mike Wacker’s picture

You probably should create a new issue instead of a piggybacking off an old closed issue, especially so that future people searching the issue queue will have an easy time finding this in case they have a similar issue.

But anyway, I'd first take a look at http://drupal.org/node/837620. That has a patch which you'll want to apply to the code.

SunMailer's pretty reliable once its set up. Is it perhaps the case that you need to choose a specific display or assign some arguments to your view? SunMailer only sends content anonymous users can see, though there are ways to change that so that authenticated users can see content based on their permissions (that will come with a performance hit, though, as the newsletter must be regenerated for each user).

lhubbert’s picture

Got it, you're right I should have started a new issue. Your comment about SM only being able to send content viewable to anon users is a big hint, my entire site requires user authentication. It's a closed environment so I'm not too concerned about the performace hit

But when I check the option to "Customize newsletter for each subscriber" I still don't get any content in my preview. Is there somewhere else I should be looking? I so want to use this module!

Mike Wacker’s picture

If you have individual emails enabled, then the preview doesn't show because it will look different for each user, but if you send the newsletter, it will send each individual the content they can see.