Paragraph spaces in email template function

Question

I am using this function to send an email to users after publishing, but I need to add paragraph spaces between text. Not sure how to do this.

   function wpse_366380_email_on_publish( $new_status, $old_status, $post ) {
        if ( 'publish' == $new_status && ( 'auto-draft' == $old_status || 'pending' == $old_status ) ) {
            $post = get_post($post_id);
            $author = get_userdata($post->post_author);
            $subject = "Post Published: ".$post->post_title."";
            $message = "Hi ".$author->display_name.",
            Your post, "".$post->post_title."" has just been published. Ps: Share your contributions on your favorite social media!
            View post: ".get_permalink( $post_id )."";
            wp_mail($author->user_email, $subject, $message);
        }
    }
0
JoaMika 2 months 0 Answers 10 views 0

Leave an answer