Plugins that send emails, like Gravity Forms, often let you set the ‘from’ address – but not the ‘sender’. Instead they use what WordPress is configured to use – making spam filters see this as a spam message.

The code below shows how to to set the ‘Sender’ address to the ‘From’ address.