#3955 getMessageDeliveryByName prevents emails from going out

Slash 2.5/3.0
open
Chris Nandor
Messaging (110)
5
2007-08-15
2007-08-15
shane
No

In Messages.pm, sub send there's

if ($msg->{user}{prefs}{$msg->{code}} == $self->getMessageDeliveryByName("Mobile")) {

well if the message_deliverymodes doesn't have "Mobile" in it, getMessageDeliveryByName will return... what? zero.

And if a new user's email message is trying to go out, their pref is going to be zero.

So Messages.pm sits and spins and set $addr to $msg->{user}{mobile_text_address} but that can't possibly exist for this user, because they are new.

And since the $addr is empty, the emailValid($addr) check fails.

End result, no new account emails are being sent out an any new installs, or any recent installs that were upgraded recently but don't have 'Mobile' in message_deliverymodes.

It would seem that getMessageDeliveryByName should return something to represent unfound if not found so the if clause could catch on that and set $addr to $addr = $msg->{altto} || $msg->{user}{realemail};

Discussion

  • shane
    shane
    2007-11-28

    Logged In: YES
    user_id=52587
    Originator: YES

    FYI. Someone's asking about this problem on the slashcode listserve. Was this fixed but the bug not updated?