These changes require to install a Divi child theme with a contact form module inside. Check the following article if you don't have a child theme with the Contact Form module in it yet:
https://intercom.help/elegantthemes/faq-s-and-troubleshooting/moving-contact-form-module-to-child-theme

Next, open up  includes/ContactForm.php  file from the child theme folder and search for this code:

wp_mail( apply_filters( 'et_contact_page_email_to', $et_email_to ),
et_get_safe_localization( sprintf(
__( 'New Message From %1$s%2$s', 'et_builder' ),
sanitize_text_field( html_entity_decode( $et_site_name, ENT_QUOTES, 'UTF-8' ) ),
( '' !== $title ? sprintf( _x( ' - %s', 'contact form title separator', 'et_builder' ), $title ) : '' )
) ),
! empty( $email_message ) ? $email_message : ' ',
apply_filters( 'et_contact_page_headers', $headers, $contact_name, $contact_email )
);


and replace it with:

wp_mail( apply_filters( 'et_contact_page_email_to', $et_email_to ),
et_get_safe_localization( sprintf(
__( '%1$s has sent you a message %2$s', 'et_builder' ),
sanitize_text_field( html_entity_decode( $contact_name, ENT_QUOTES, 'UTF-8' ) ),
( '' !== $contact_email ? ' by ' . $contact_email : '' )
) ),
! empty( $email_message ) ? $email_message : ' ',
apply_filters( 'et_contact_page_headers', $headers, $contact_name, $contact_email )
);


That's it. Now you should see the sender's email in the subject of your emails that are sent from the Divi Contact Form Module.

If you'd like to further customize the Subject line, you can replace this piece of text with your own Subject:

%1$s has sent you a message %2$s

Did this answer your question?