• Hello,

    I would like to pre-register my users to my site and then have an email sent to them. That is the easy part.

    What I want is to customize the email that is sent to new users so that it has my logo, and a personalized message from the site. I have tries various plugins for email templates and they all seem great for changing colour, adding a logo, font size, etc but none that I have seen allow for the body content of the email to be altered.

    I’m sure it is simple, but how do I create a customized “Welcome to my site” email for my users?

    This is one of the dozens of tutorials I have read to try and help with this question:
    wpbeginner.com/plugins/how-to-add-beautiful-email-templates-in-wordpress/

    Thanks for the help and guidance!

    • This topic was modified 5 years, 7 months ago by willise.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    If by pre-registration email you mean the email sent when someone fills out the default WP registration form, you can use the “wp_new_user_notification” filter in PHP to alter the message any way you like. The catch is that WP sends emails as plain/text MIME type, so there is little point in providing images and HTML in such messages. This applies to any use of wp_mail(), not just registration notifications.

    In order to send HTML and images within WP email messages, use the “wp_mail_content_type” filter to set the type to text/html. If you call wp_mail() directly, you could instead supply 'content-type' => 'text/html', as part of the array passed as $headers.

    In case you were not aware, email clients are terrible at properly rendering HTML in messages. Don’t try to do anything fancy or it will surely fail to render correctly in someone’s mail client. Stick to the very basics. Test your message in as many different mail clients you can to be somewhat confident your message will appear correctly.

Viewing 1 replies (of 1 total)
  • The topic ‘Email Customization’ is closed to new replies.