Hi,

  • Views_send (ver 7.x-1.2)
  • Mime Mail (version 7.x-1.0-beta4)
  • SMTP Authentication Support (version 7.x-1.4)
  • Mail System (version 7.x-2.34)

Mail System (enabled), Mime Mail (enabled), Mime Mail Action (disabled), Mime Mail CSS Compressor (disabled), Mime Mail Example (disabled)

I have a consistent error and some odd behavior when cron sends the emails.

Warning: Illegal string offset 'filename' in views_send_confirm_form() (line 552 of /var/www/html/ds.gpei.ca/sites/all/modules/views_send/views_send.module).


With these settings the email fails:

admin/config/system/mailsystem
Site-wide default SmtpMailSystem
Mime Mail module class MimeMailSystem
Views Send module (direct key) class MimeMailSystem


With these settings the email works but has no attachment:

admin/config/system/mailsystem
Site-wide default SmtpMailSystem
Mime Mail module class MimeMailSystem
Views Send module (direct key) class SmtpMailSystem

Interestingly
If I have attempted to send an email with an attachment using the first configuration, that message arrives using the second configuration WITH THE ATTACHMENT. :-)

Any Idea's?

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fgjohnson created an issue. See original summary.

pifagor’s picture

Status: Active » Needs review
FileSize
676 bytes

patch

fgjohnson@lojoh.ca’s picture

Thanks,
That gets rid of the error message successfully..

There is still the issue of what mail settings work when.

Mail doesn't send
Site-wide default MimeMailSystem
Mime Mail module class MimeMailSystem
Views Send module (direct key) class MimeMailSystem
----------------------
Mail doesn't send
Site-wide default SmtpMailSystem
Mime Mail module class MimeMailSystem
Views Send module (direct key) class MimeMailSystem
----------------------
Mail doesn't send
Site-wide default SmtpMailSystem
Mime Mail module class SmtpMailSystem
Views Send module (direct key) class MimeMailSystem
----------------------
Mail doesn't send
Site-wide default MimeMailSystem
Mime Mail module class SmtpMailSystem
Views Send module (direct key) class MimeMailSystem
----------------------
Mail sends - No Attachment
Site-wide default SmtpMailSystem
Mime Mail module class MimeMailSystem
Views Send module (direct key) class SmtpMailSystem
----------------------
Mail sends - No Attachment.
But upon cron sends ALL previously failed emails from above settings ... including attachments if set to Spool.

Site-wide default SmtpMailSystem
Mime Mail module class SmtpMailSystem
Views Send module (direct key) class SmtpMailSystem

fgjohnson@lojoh.ca’s picture

Updated to dev...

The attachment seems to "Attach more quickly" in the interface.
But I am still not able to have it actually send with the message.

fgjohnson@lojoh.ca’s picture

Have gotten this to work by using the same mail system, smtp_authentication, mime_mail and configuring postfix.
Mail threads are fun.

This is a great module.
Make sure your php memory is sufficient.

hansfn’s picture

He-he, mail is always fun. Could you present what worked in the same format that you did in the list above? Just to be 100% clear. I'll see if there is anything Views Send can do itself to improve the situation - at least update the documentation.

fgjohnson@lojoh.ca’s picture

We did a work around...
Exposed the "Attachment" online and included the link in the body of the message.
(I use a rule to set the appropriate link based on other node criteria upon save)

Mail sends right away - No Attachment
Site-wide default = SmtpMailSystem
Views Send module (direct key) class = SmtpMailSystem
Theme to render the emails = default
Configured postfix on the box as a relay to outgoing server.

:-)

hansfn’s picture

Status: Needs review » Active

OK, I have looked into this and Mail System in general. I now understand why things don't work and the Interestingly part that you mention ;-)

Your email should be formatted by the MimeMailSystem and sent by the SmtpMailSystem. To enable this, visit admin/config/system/mailsystem and create a new class with the obvious choices. Then set the class for "Views Send module (direct key)" to "MimeMailSystem__SmtpMailSystem". Unfortunately, this doesn't work if you use the 7.x-1.3 version of Views Send since the module wrongly sets the Mail System on it's own. Please download the 7.x-dev version and see if it works. (It might also work with the 7.x-1.2 version if you set the Site-wide default MailSystemInterface class to "MimeMailSystem__SmtpMailSystem".)

I will make a 7.x-1.4 release when you confirms that this works.

PS! The explanation for the Interestingly part. When the message is send with Mime Mail it failes, but is spooled. When you switch to SMTP Mail and cron is run the spooled message is sent successfully.

hansfn’s picture

Status: Active » Fixed

I didn't get any confirmation. Will release 7.x-1.5 now and set issue status to fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

fgjohnson@lojoh.ca’s picture

Hi,
Thanks for this effort...

Back at this again, and will re-visit this to appropriately close thread.

tiagopacheco’s picture

I tried every solution here but still not working.

I'm using smtp authentication, mime mail for email format but still not attaching the uploaded file to the email.

Any idea?

hansfn’s picture

Well, as a general note you should include the version number of Drupal and the modules involved so we can try to reproduce the problem.

Anyway, from the screen shot I notice that you have defined the wrong key for Views Send - it should be "direct". (You are defining this under "New Setting".)

tiagopacheco’s picture

It's working now. I'm using Drupal 7 and the module is 7.x-1.6+2-dev.

Thanks for your help