Support » Fixing WordPress » 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 <>
    The name is extracted with the space before it, and then the From: field is built again with


    spaces after the string “From:”. If you use wp_mail with no space like in “From:Joe <>”, 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.