WordPress.org

Support

Support » How-To and Troubleshooting » A very tiny bug in the wp_mail function

A very tiny bug in the wp_mail function

  • I noticed that when you use the wp_mail function with a very correct From: field containing BOTH a name and an address like:
    From: Joe <joe@myself.org>
    The name is extracted with the space before it, and then the From: field is built again with

      two

    spaces after the string “From:”. If you use wp_mail with no space like in “From:Joe <joe@myself.org>”, it is OK. If you don’t use a name, it is probably OK.
    Wouldn’t it be a good idea to ‘trim’ the name before setting the variable?

  • The topic ‘A very tiny bug in the wp_mail function’ is closed to new replies.