Closed (fixed)
Project:
Mail to OG
Version:
6.x-1.0-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2009 at 19:27 UTC
Updated:
2 Mar 2012 at 23:31 UTC
from #585658: mail2og not working for any user but user 1/site admin, domain missing from mail2og block
I've turned on the mail2og block, and weirdly it displays this text, minus the domain: "You can post to this group by sending an email to test_group_for_tobias@" - this may not be related to this problem.
Comments
Comment #1
robharward commentedI have the same problem.
Comment #2
tobias commentedGreat - glad to have this confirmed.
arthurf, do you have some time to devote to finishing this module? Looks like we have a few testers here now.
Cheers,
Tobias
Comment #3
deggertsen commentedI have the same problem and would love to help test.
Comment #4
deggertsen commentedI found what I think is the problem though I am no PHP expert.
In the function on line 674 I noticed something.
The variable $email is only being redefined in the else statement. So if the if statement comes out true then $email is not being redefined how it should in the later function that displays the email address in the block. So what I did was simply copy line 690 and pasted it at the beginning of the function that outputs the block info on line 735 like so:
So I'm basically redefining $email again in this theme function. Does this mess anything up? It fixed the address display in the block for me. Anybody else?
Comment #5
socialnicheguru commentedthis addition works. Thank you!!!!
Edit:
domain does not show up because this expression is not correct
//parse the domain
$domain = preg_replace("/(.*\@)/", '', $to_address);
it's around line 336.
Comment #6
ilo commentedYes, actually, that should be something close to:
$domain = preg_replace("/(.*\@)/", '', $mailbox['mail']);
This way will extract the domain from the selected mailbox address.
Comment #7
jludwig commentedPatch committed. Thanks deggertsen and ilo!