Guess what I did today? I sent an email to noreply@speakinginbytes.com
. Why did I send an email to a noreply@{domain}
address? And why to my own domain? Because as I was flying through my email using all of my fancy gmail shortcuts I opened an email, pressed r
to reply typed up a response pressed tab
and return
and let it fly. Only then did realize that I sent it to my own domain. What would've been really handy in this situation would be a way to automatically change the from address in emails that already contain the requestor's email address.
A quick Google search will turn up this great post by the WP Ninjas (the guys who make Ninja Forms) about dynamically changing the email address. This is actually a really great solution because you can specify exactly which fields you want to use for the name & email address as well as which forms you want to apply this to. The only down side is that it isn't plug & play – and I like plug and play. That way if I ever create another form or modify my form by adding or deleting fields it will still work.
Automagically Change the From Address!
So to take care of issue I wrote a little plugin, Ninja Forms – Change From Address. If you want to use this plugin you can go to the homepage, download it, extract the zip file, and upload the folder to your /wp-content/plugins/
directory of your site. It will automatically work with every form on your site.
Basically this plugin is going to loop through all of your fields and if you included name fields or email fields it will use to to automatically replace those in the notification email that gets sent to the administrator. Now you can reply to the email that gets sent and it will go to the correct person!
Only Apply This to Certain Forms
I'm sure there's a use case where a user doesn't want this to apply to all forms. If that's the case I would check out that original blog post by the WP Ninjas and look into restricting it to only certain forms by adding a conditional check.
Happy replying!
Photo Credit: notoriousxl via Compfight cc