Ninja Forms
[resolved] Can I set E-Mail "From" Name (7 posts)

  1. jeezyo
    Posted 4 years ago #

    Hi, nice plugin. Only problem im experiencing, is that when a form is submitted, the notification email is always ending up in spam. I suspect it could be because there in no "FROM name", only an e-mail address. Is there any way I can define that name to see if that solves the problem? Or do you have any other suggestions on how to keep these messages out of spam?


  2. Kevin Stover
    The WP Ninjas
    Plugin Author

    Posted 4 years ago #


    If you write your "FROM email" as: Sally Johnson <s.johnson@address.com> it will show up as a name in modern email accounts.

  3. Gizmo 76
    Posted 4 years ago #

    In relation to this I think...

    Is it possible to set the Email Sent From: to being the Email Address filled in on the form?

    Is this possible in anyway just like we can grab the information like [Name] for our success message?

  4. Kevin Stover
    The WP Ninjas
    Plugin Author

    Posted 4 years ago #

    Hey Gizmo, Ninja Forms doesn't do this out of the box, but if you wanted to get into the code, you could probably make it do that fairly easily. It is a feature that we will consider adding to future versions. Thanks for your interest.

  5. Gizmo 76
    Posted 4 years ago #

    Many thanks for your reply.

    I'll have a little venture around the code and see what I can do :)

    I Just find it easier to keep tabs on forms coming in from the website, and then messages are threaded together in my email client as I can just reply to the initial form message and keep everything tidy and organised.

    Thanks again.

  6. frenchesco
    Posted 4 years ago #

    It's been a month since you posted Gizmo, so you've probably already figured out how to do this, but if you haven't yet, or for the benfit of others:

    If you want to populate the From field with an email retrieved from the form, you can just add the following to \includes\processing_functions.php > ninja_mail_form function in the first foreach loop:

        $email_from = str_replace("[$label]", $val, $email_from);

    It needs to be underneath the following lines:

    $id = $post['id'];
    $label = $post['label'];
    $type = $post['type'];
    $val = $post['value'];
    $extra = $post['extra'];

    Then in the admin area you can just set the Email Sent From field to [Name]<[Email]>. (You'll need to replace [Name] and [Email] with whatever names you gave to these fields on your form).

    Would be great if it could be implemented in a future version as I really don't like having to modify plugins this way.

  7. kamenlee
    Posted 3 years ago #

    Hey franchesco, THANKS! Worked like a champ.

    This should be, at least, an option in the paid version. First time I've used it and immediately was asked to change the behavior.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ninja Forms
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic