Needs work
Project:
Mail Logger
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2009 at 18:06 UTC
Updated:
16 Mar 2018 at 18:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hargobindHere's an updated patch against 6.x-1.x-dev. It also includes translation fixes, status message that the mail was sent, and a proper redirect to the current page being viewed.
Comment #2
hargobindComment #3
hargobindFixed bug where subject and body were not being attached to the resent mail.
Comment #4
nancydruComment #5
nancydruComment #6
hargobindHere's a patch against 7.x that has been tested across 3 of my sites and is working great.
I have one concern though which is that the email's body is stored AFTER it has run through
$mail_system->format()(line 89 of 7.x-1.4 or line 115 of this patch). And I think (but not positive) that $mail_system->format() is run AGAIN on the email body when the email is resent. All kinds of things could theoretically happen during $mail_system->format() if the site is using an alternate mail system including wrapping the body in a fancy HTML template, content replacement, etc. So the ideal scenario would be to store the email body as a serialized value and only call $mail_system->format() when viewing the email, but that's a bigger overhaul of the code than I'm willing do to right now. And, it would likely affect only a small percentage of sites that use this module, especially since most admins won't be using the "resend" feature except in fringe cases. But it's worth noting this in the readme.Comment #7
nancydruYes, I agree that would be a better way to go.
Comment #8
hargobindHere's an updated patch based on the latest 1.x-dev and applies cleanly to 1.6.
I'm still not entirely satisfied with the functionality for stable use, but I'm making this patch available for anyone who wants it.
Two more things I want to eventually add (in addition to what was mentioned in comment #6: provide a confirmation screen before just resending the email, and adding the resend button to each individual mail log entry.
Comment #9
markusd1984 commentedI installed mail logger mainly for the need to resend emails as the maillog module with their patch to add the resend button doesn't appear for me , it seems such simple yet powerful feature addition.
I tried mail logger and #8 but had to apply some of it manually for mail_logger.module
I tried the resend button several times but unfortunately, it doesn't send them again :(
Any way I can debug or check this?
Btw. great work @hargobind and great idea for a confirmation screen.
Ideally could be an indicator or even number count of 'resends' for tracking :)
Comment #10
markusd1984 commentedI just realised due to #6 it might not work with HTML mail (+SMTP & mailsystem)?
I don't use theming and emails are sent and logged fine with mail logger.
If so, would be awesome if it can be integrated (I tried without HTML Mail, using just SMTP mail but also didn't resend) .
Resending emails is great for testing but also as quick and easy means to send them again to serve as a reminder to a user :)
Comment #11
markusd1984 commentedWeird behaviour, I just disabled MIME Module and now the resend button worked.
BUT after I enabled MIME again I now have a much bigger issue as HTML Test emails are not being sent anymore :(
last line of
When I disable mail logger with MIME active Test emails are still not being sent and I get error:
Only once I disable MIME it's working again, hence I wonder if something broke or if the issue could be with MIME.
UPDATE: I had to re-install HTML MAIL for the Test Mails to work again.
I suspected that something got corrupted using the re-send patch and MIME module, maybe in the db.
Comment #12
markusd1984 commentedI can confirm: resend is working when MIME is disabled - I can resend emails that were originally sent without MIME and also resend emails that where sent with MIME (were the text/plain alternative is then shown in the email body).
When MIME is enabled the resend doesn't work :(
Any chance you can look at this please, since it's not the mail systems the issue ?
I suspect that the mime part would have to be stripped for resend?
Comment #13
nancydruAll of my systems use Mimemail, so testing without may be difficult. An additional problem is that all the email handling systems think they should be the last to run and module weights are not sufficient to fix that. I had to install a custom hook_module_implements() to get Mimemail to run before SMTP, and Mail logger after both of them (it may not be the best, but it works). Specifically, #6 would be difficult to do in my situation.
Comment #14
markusd1984 commentedThanks, I haven't looked at MimeMail yet vs Mail Mime :)
Are you using this instead of the HTML Mail Module?
And because of your setup, you can't use the resend button at all?
If you can... is your mime part stripped out when resending emails (that had been sent with mime originally) ?
Comment #15
nancydruWe use MailSystem, MimeMail, and SMTP. I have not yet had the time to try this patch.