Hi,
You can try to use the action hook rwmb_frontend_after_process
to get the attachment URL (field value) based on the post ID and included in the email content. For example:
add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) {
if ( 'my-meta-box' === $config['id'] ) {
$files = rwmb_meta( 'my_field_id', '', $post_id );
wp_mail( '[email protected]', 'New submission', 'A new post has been just submitted.' . $files[0]['url'] ); //or change it to $files['url'] if you have only one attachment
wp_safe_redirect( 'thank-you' );
die;
}
}, 10, 2 );
Refer to the documentation https://docs.metabox.io/fields/file-upload/#template-usage
https://docs.metabox.io/extensions/mb-frontend-submission/#form-hooks