Closed (won't fix)
Project:
Simplenews
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Minor
Category:
Feature request
Assigned:
Reporter:
Created:
15 Aug 2005 at 15:00 UTC
Updated:
23 Jun 2016 at 11:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
DriesK commentedCalvin, IMO this is a feature request, not a bug. Attachment and image handling are just not Simplenews features (yet). I have been thinking about whether or not to implement this though.
Do other people think this is wanted?
Comment #2
ejort commentedI've also been thinking about both of these features.
If DriesK doesn't jump on this I'll probably develop this functionality in the next few weeks and submit some patches.
Cheers,
Eric
Comment #3
DriesK commentedEric, you are more than welcome to jump on this and submit patches. Next week, I'm going to start working again (real work again :-)), just had 4 weeks of leave, so I won't have as much time as I have now...
Comment #4
Alaska commentedHave not tired an HTML newsletter with the latest SN update. But with the last version the following works fine, as least in my tests, for including an image within the body of the newsletter.
Let me know if this still works in the new version of SN.
Thanks,
Jim
Comment #5
DriesK commentedIn short: it does :-)
Comment #6
DriesK commentedActually, I think the same goes here as for html to txt. Mail.inc could offer embedded images (which is not the same as inluding an html img-tag) and attachment handling. So again, maybe it's a waste of time to write this for use with activeMailLib, because when mail.inc is out, Simplenews is almost certainly going to use it...
Comment #7
ejort commentedYeh, you're right that this is also functionality that mail.inc can/should include. It should be an interesting IRC chat :-)
Comment #8
P00595 commentedHi,
I don't know much about PHP (yet), but I managed to copy bits of code from the mail module to enable embedded images and theme style support in the latest CVS simplenews module (v 1.7 2005/08/15).
I'd create a patch file to show you what I did, but I don't know how to so I've attached a copy of the simplenews.module I changed.
Regards,
Calvin
Comment #9
DriesK commentedHi Calvin,
If you want to learn how to create patches, there is a manual on drupal.org.
I looked at your code, and I have 2 comments to make.
First, as I already wrote in this and other issues, I don't think that the Simplenews module itself should offer this kind of functionality. There should be (and will be) a separate mail backend, that should, imo, be able to handle all of this. Simplenews (and any other module that wants to send email) just hands over a fully populated node, including sending info (to/from/format/charset/encoding/...), and the mail engine takes care of it being properly send. Currently, there is a discussion going on about this on the drupal-devel@drupal.org mailing list.
Secondly, I don't see how your changes enable embedded images. As I wrote before, embedding images in an email is not the same as typing an html img tag, the src attribute simply pointing to an online image. If that's what you want: it is already possible with the current version as Alaska (Jim) pointed out in this issue.
True embedding is this: I send an email, click 'insert image' in my mail client, select an image that is stored on my local disk (an that is not available online). When the email is received, the image is 'embedded' in the email: it is not fetched from a web server.
Doing this would require a script that detects the image type (gif, jpeg,...) and sets the correct content-type, base64-encodes the image, generates a cid (content-ID), and correctly assembles this information in the email.
Comment #10
DriesK commentedA little more on why I think true embedding is important: of course, when you would create a newsletter using Simplenews, you wouldn't use an image on your local disk, but one on your web server. However, you could delete the node (and the image) later, and this would cause the image also not to be available anymore in all emailed newsletters. Or your web server could go down. Or, a lot of people using laptops, may want to read their email when they are not online (in the train,...), so if the image is not embedded, they wouldn't be able to see it. The same goes for people with dial-in internet connections (pay per minute): they connect, retrieve their mail, disconnect, and start reading.
Comment #11
P00595 commentedHello Dries,
My apologies over the confusion generated by my use of the term 'embedded image'. I agree with your description of what an 'embedded image' is and see the value in supporting it in the way you describe.
A minor point however - I don't fully believe the system can be said to already support the creation and emailing of newsletters containing HTML IMG tags. When I look at Alaska's code snippet I get the feeling he expects the newsletter authors to have the necessary HTML skills to be able to type in HTML IMG tags with fully qualified URLs for the SRC attribute.
Unfortunately the bulk of the newsletter authors I expect to be supporting have no knowledge of HTML, and will be using the TinyMCE and 'Image Assist' modules to generate the newsletters.
I may be wrong, but when I look at the URLs these tools generate for images on the server, they do not contain a domain name, thus the necessity for the system to auto generate a HTML BASE REF tag when the newsletters are emailed out. And likewise, all the style sheet references need to be auto generated.
Regards,
Calvin
PS: I also managed to add support for emailing attachments to your SimpleNews module, however I won't upload the code knowing that you are working on a better architectured solution.
Comment #12
DriesK commentedYou're not wrong at all. I get you now. However, if we implement embedding, the issue will be solved anyway, because the mail engine would then have to deal with (Drupal) urls when it encodes the image (and possibly also with stylesheets and/or stylesheet urls).
So I suggest we wait until the mail engine is out. We'll see what it can and can't do, and then we can fill in the missing pieces specifically for Simplenews, but compliant to the mail engine's code.
Comment #13
beginner commentedWhen is the mail.engine coming out? Is this part of the coming 4.7?
Nice module. Looking forward to being able to create simply html newsletters....
B.
Comment #14
shouchen commentedCould we please have an update on this issue? How are things going with the mail engine / embedded images, etc?
Thanks!
-Steve
Comment #15
DriesK commentedActually, I'm at drupalcon Amsterdam right now. We discussed mail.inc yesterday, had a small extra mailing meeting, where these issues where covered (amongst others). There will even be more discussion on this somewhere later this week. By then, there should be more clarity about mail.inc's functionality, about timeframes, and what simplenews will have to provide separately. I'll keep you informed on this page.
Comment #16
DriesK commentedSee this node for updates and more information: Mail API for Drupal.
Comment #17
trevornz commentedHi Everybody
Firstly, thanks to the developers for the very handy simplenews module.
I'm just wondering if anybody has managed to modify this module so that file attachments can be added to Newsletter sends, and if possible please could they please post a copy of their changes.
I have tried to add in the attachement code from the mail.module but with no success so far.
I'd really appreciate any help or advive on this one on this one.
I'm using Drupal 4.6
Thnaks
Comment #18
DriesK commentedAttachments will be included in Simplenews 4.7 releases. The first stable release of a simplenews 4.7 branch is expected to become available around the same time as when Drupal 4.7 is released (and this date is not yet known). Attachments will not be made available in simplenews 4.6.
Comment #19
Wesley Tanaka commentedThere's a patch available which removes base href from drupal completely, and causes urls to be absolute within the server (e.g. "/drupal/node/1234" instead of "node/1234"). If this is interesting to you, you might consider adding a comment on: http://drupal.org/node/13148
Comment #20
wulff commented@trevornz: If you enable upload.module you can attach the uploaded files by adding the following to
sn_mail_send():(Add it before the call to
Send())I use this solution on one of my sites and it works as intended: Files added to a simplenews node with upload.module are attached to the e-mails sent out by simplenews.
Comment #21
David Lesieur commented#20 works well for me. But I'd recommend removing the
if ($file->list)condition. I think all uploads should be attached, not just those that have been flagged to be listed in the node body.So you'd have:
Comment #22
and-1 commentedYes, #20 works well.
I do not understand only if it is real to embed images into email body using activeMailLib functionality?
. activeMailLib doesn't use "Content-ID" param that is usually
I mean HTML+images email body (non-"attachment").
The problem for me is how to generate
using here.
Could anyone prompt/(correct me) how to solve the problem within Simplenews?
Comment #23
apakuni commentedFYI. I dropped David's hack (#21) in SimpleNews 4.7 in at Line #1042. It did not seem to work.
Comment #24
sutharsan commentedComment #25
kavi_r commentedI am using drupal 6.4.I try to implement a image in a body field.i download tinyMCE(6.x-1.1.tar) editor.But buttons are nor displayed.
anybody help me?
Comment #26
betovargHas this issue been resolved? I downloaded the module and Im adding images as attachments, but they dont show up in the body, they show up as attachments.
Thanx!
Comment #27
miro_dietikereven 3 .. or 5 years later it's the very same situation.
we need a transport (like mimemail) module that supports inline images.
then we can discuss how to support things like inline images.
meanwhile won't fix, till someone provides a clean library where we can rely on.
that's a lot of work, man.. if u have the funds, hire a dev and we're happy to see that feature!
Comment #28
dianacastillo commentedgo here admin/config/services/simplenews , click edit and change emails settings to HTML
Comment #29
biswajit roy commentedHi Diana,
Thanks for your comment. It's work for me.
Cheers,
B. Roy