Menu

#23 Emails sent to admin_emails even when empty

Unknown
open
nobody
None
5
2005-02-15
2003-10-07
No

If the configuration variables admin_email1 and
admin_email2 are left blank, ORS tries to send mail to
the addresses 'admin_email1' and 'admin_email2' anyway.
It should probably instead send no mail when these
variables are null.

Discussion

  • Jeremy Shaver

    Jeremy Shaver - 2003-10-07

    Logged In: YES
    user_id=713937

    We should add a test in our send mail function which looks
    at the to field and, if it is empty (except for commas,
    which might end up in there depending on how the string is
    put together) then it doesn't send the message.

    if (str_replace(",","",$to)=="") return();

     
  • Jeffrey Tacy

    Jeffrey Tacy - 2003-10-15

    Logged In: YES
    user_id=829347

    When I coded the e-mail announcement feature I checked to
    make sure that getcontact() for a given user didn't return a
    blank string before I tried to send an email to that user. I
    think it's a good idea that sendemail() should check for a
    blank string itself, but I don't think that sendemail() should be
    called when we aren't sure that we are sending a reasonable
    parameter to it.

     
  • Jeremy Shaver

    Jeremy Shaver - 2003-10-15

    Logged In: YES
    user_id=713937

    It seems to me that, from an object-oriented point of view,
    the issues relating to whether or not there is sufficient
    information to send an e-mail should be the responsiblity of
    sendemail()? That way the tests for validity are all in one
    place and can be easily adapted as necessary.

     
  • Jeffrey Tacy

    Jeffrey Tacy - 2003-10-15

    Logged In: YES
    user_id=829347

    Good point. I support your recommended course of action.

     
  • Jeremy Shaver

    Jeremy Shaver - 2005-02-15
    • summary: Emails sent to admin_email1 and admin_email2 --> Emails sent to admin_emails even when empty
     

Log in to post a comment.

MongoDB Logo MongoDB