This snippet is almost identical to the Notify User When Submitted Post is Published snippet. The key difference is this will send a notification to post author rather than an email stored in a custom field. This approach is only applicable when a) logged in users are creating posts via a Gravity Form or b) the Gravity Forms User Registration Add-on is being to used to register a user and a post is being created by that user from the same form.
Don’t forget to set your basic email settings. This includes the name and email from which the email should be sent as well as the subject and message of the notification email.
|$from_name = 'Your Name';|
|$from_email = 'email@example.com';|
|$subject = 'Your Subject Here';|
|$message = 'Your message here.';|