Closed (fixed)
Project:
Maillog / Mail Developer (obsolete)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
27 Oct 2011 at 15:38 UTC
Updated:
15 Jan 2012 at 19:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
dmartinc commentedHello,
I am suffereing the same bug. I wanted the module to have a log of all mails sent by my site, but I do not want to block them.
Cheers,
David
Comment #2
itserich commentedSame problem. Log shows e-mail sent, but they are not received.
Disabled Maillog and e-mail is received again.
The only other mail module I have is Newsletter, so perhaps there is a conflict, but that is just a possible speculation. Newsletter has been working great for me on its own.
http://drupal.org/project/newsletter
Comment #3
ParisLiakos commentedCan anyone check this patch?
i enabled sending of mails by using Drupal's default mail system
Comment #4
ParisLiakos commentedUgh forgot a semicolon:/
stupid me.disregard the previous patch,use this instead
Comment #5
ParisLiakos commentedAnd this is critical since it completely breaks the mail functionality all across the site
Comment #6
itserich commentedThasnks rootatwc.
I applied the patch manually.
This is what now appears in maillog/includes/maillog.mail.inc
When I tried to send mail this error:
May have applied the patch incorrectly, did it manually.
Comment #7
ParisLiakos commentedyes you forgot a
}.put it right in the end of the fileComment #8
itserich commentedThis is working for me now.
Thanks rootatwc!
Comment #9
ParisLiakos commentedGreat!then i guess this is RTBC
Comment #10
jonathan_hunt commentedPatch at #4 solved the problem for me, thanks. It didn't apply with git apply, but patch -p0 worked.
Comment #11
miro_dietikerUhh, need to review this. Thank you.
Comment #12
Curt44319 commentedApplied the patch manually.
Tested as thoroughly as I can imagine.
Works perfectly.
Comment #13
berdirSome trailing whitespaces here, which can be removed with git apply --whitespace=fix when the patch is applied.
Not sure about these messages. Maybe make that configurable as well so that you can disable displaying them. And they could probably be reworded a bit, especially the one without the link. Using Drupal in user facing text should be avoided. Maybe something like "Sending mails is currently disabled.".
Also, the path there is wrong, that's the Drupal 6 style of configuration links. If the maillog settings are really at that location, then that needs to be fixed.
Comment #14
ParisLiakos commentedThanks for the corrections Berdir.
i believe this is better now.used watchdog for non-adminstrators
Comment #15
ParisLiakos commentedmeh disregard #14
Comment #16
ParisLiakos commentedOne more improvement, swapped
time()withREQUEST_TIMEComment #17
berdirHm, I'm surprised that this actually works?
The format and mail methods of DefaultMailSystem aren't declared as static, so it shouldn't be possible to call them without having an actual object instance.
One way to solve this would be to extend MailLogMailSystem from the DefaultMailSystem class and then call parent::format($message) (which looks like a static call as well, but actually isn't).
The downside of this is that it is hardcoded to the default system (as is your code too) but it looks like e.g. devel.module is doing the same thing.
Alternatively, you could do this:
Then we could still make this configurable at some point, if someone needs it (e.g. to send mime mails or through smtp).
Comment #18
ParisLiakos commenteddoh...they are not static indeed..
i am as suprised you are...didnt know that calling a public function this way, actually works:/
the docs confused me:P
saw this page http://api.drupal.org/api/drupal/modules--system--system.mail.inc/class/... and
::made me think that its methods are static...Comment #19
ParisLiakos commentedok here it is
Comment #20
berdirManually tested that this patch works correctly.
Comment #21
miro_dietikerThank you, guys.
Committed, pushed.
Fixed, was D7 only. No backport needed.