Closed (won't fix)
Project:
Simplenews
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2007 at 13:09 UTC
Updated:
29 Apr 2014 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sutharsan commentedHas this patch been tested with mimemail?
I can not get it working with :
* simplenews.module,v 1.56 2007/02/20
* mimemail.module,v 1.14.2.1 2007/01/05
* mimemail.inc,v 1.18.2.1 2007/01/05
Up till now I have found that the boundary declaration (boundary="OC-120320074453-CO") is missing in the mail while it is there in the patch.
Comment #2
BooDy commentedActually the patch was tested with mimemail.module disabled.
Comment #3
pal_ur commentedIt seems neither with 5.x-1.0, nor with 5.x-1.1 to work... Could anybody help?
Thx.
Comment #4
BooDy commentedpal_ur
The patch applies fine with 5.x-1.1. Did you give the upload module less weight than simplenews in drupal's system database table?
Comment #5
pal_ur commentedYes. I gave upload module weight "-5", the simplenews module has "0". I send a test message, wich is sent out, but the attachement is in the body of the letter. It looks like this:
--OC-140320072308-CO ------------TEST LETTER TO FIND OUT HOW TO ATTACH------------ Test message body -- -- Footer will be appended here --OC-140320072308-CO Content-Type: image/jpeg; name="virag.jpg"; Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="pic.jpg"After (and only after) the filename is a linebreak, and then begins the encoded (?) attachement in the body of the message, ot attached.
Comment #6
pal_ur commentedSorry, a little misspelling...
--OC-140320072308-CO ------------TEST LETTER TO FIND OUT HOW TO ATTACH------------ Test message body -- -- Footer will be appended here --OC-140320072308-CO Content-Type: image/jpeg; name="virag.jpg"; Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="virag.jpg"Comment #7
sutharsan commentedUsing the strength of mimemail to handle ... mime mail, I made this patch to handle attachments for both html and plain newsletters.
Use this patch together with this mimemail patch.
* All node attachments are send with the newsletter. The List setting is ignored.
* Mimemail is required when sending newsletters with attachment. Without mimemail the attachment is ignored. (TODO: needs documentation)
* Module weight is set at installing the module (simplenews.install) (TODO: increase weight at upgrade)
Comment #8
pal_ur commentedFine, works. Thanks a lot.
Comment #9
owahab commentedThe original patch by BooDy works perfect with mimemail module diabled.
Simply, BooDy's patch sets some mail headers to attach content to the node. When mimemail is enabled, simplenews sends the e-mail via memail which in turn overrides the headers thus the attachment appears in the body.
Disabling mimemail made this patch work fine.
I do not think I'd go for BooDy's patch rather than Sutharsan because I will need to patch one module not two.
Extra fine BooDy. ;)
Comment #10
davemybes commentedIt looks like the latest version of Simplenews (May 8, 2007) has file attachment support built-in now. Simply activate the upload module, and allow attachments for newsletters. You must also activate the mimemail module, and set the newsletter to HTML format. This works nicely on my system.
Comment #11
davemybes commentedComment #12
jun commentedThis is my first patch, needed to send newsletters in plain text with attachments.
Here's an updated patch for Simplenews version 1.4
Use this patch together with the updated Mimemail version 1.0 patch which now handles correctly (hopefully without side-effects) the sending of plain text email with attachments *without* any HTML content.
I also had to override the theme_mimemail_message function as follow (in template.php) :
function phptemplate_mimemail_message($body, $mailkey = null) {
return $body;
}
Comment #13
wkamm commentedThere are a number of patches attached to this thread, and I'm sure one of them will help me, but I'm not sure which one to use.
I am running Drupal 5.5, SimpleNews 5.x-1.4, mimemail 5.x-1.0, with the Upload module enabled.
When I send an email via SimpleNews, with attachments, in HTML format, it looks fine. The "attachment and sizes table" displays properly in the received email. The column headings are there, and the attachment names and file sizes show. I can click on the attachment name to view the file. Everything is good.
However, when I send an email in plain format (i.e. not HTML), the email looks something like this:
--------------------------------
7:36 PM 8/25/2008
strtoupper(" Attachment
")strtoupper(" Size
")
1101061218_120.jpg [ http://mysite.com/files/image.jpg ]
10.05 KB
--------------------------------
Can anybody help me understand which of these patches can fix this problem? Thanks,
Bill
Comment #14
Wurlitzer commentedwkamm, did you resolve this issue? I'm having the same problem....
Comment #15
caillou commentedYes, same problem too
Comment #16
tax commentedI'm trying to figure out on how to apply the Boody's patch, but i can't find anything: could someone kindly explain how to apply it ? Or, at least, point me in the right direction ? Thanks.
Comment #17
davemybes commentedhttp://drupal.org/node/60108
Comment #18
sutharsan commentedBy now, I don't add new features to the 5.x branch any more. 6.x does support attachments.
Comment #19
armyofda12mnkeys commentedjust an FYI since this is only link if you google 'simplenews attachments'...
You can get attachments in a SimpleNews newsletter by adding a File field to the Simplenews Content Type so user can pick a file to attach (can also use the Media module and use its WYSIWYG selector to pick the file in the file system vs always uploading a new file).