Header and Footer images for Confirmation emails?

Is it possible to add header and footer images to the confirmation emails, as well as the reminders.

Just the plain text looks very unprofessional.

  • aecnu

    Greetings upgradex,

    Thanks for bringing this up, it certainly sounds like a useful customization to the plugin.

    Unfortunately, it is not currently available - but we would love to put it into consideration for future development

    I have moved this ticket to the applicable feature requests area and I have alerted the lead developer to the request.

    It might take a bit longer than useful but alternatively, you could see if there's a developer available at wpmu jobs who could get onto it right this minute

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

  • Hakan

    Hi,

    Change email format from text to HTML:

    How can I use HTML in emails?
    Appointments+ uses wp_mail function and HTML is disabled as default. To enable HTML in emails, add these codes inside functions.php:
    function app_modify_headers( $headers ) {
    return str_replace( 'text/plain', 'text/html', $headers );
    }
    add_filter( 'app_message_headers', 'app_modify_headers' );

    http://codex.wordpress.org/Function_Reference/wp_mail

    Then add any HTML code (including image) to your email body using "app_confirmation_message" filter.

    Cheers,
    Hakan

  • CloudNet PC Admin

    Thanks Joe, I would prefer the feature to be apart of the plugin rather then us poking around in the .php files to do it.

    Hakan, can you explain this further?

    I altered the functions.php file, and added the html to the email section in Appointments+ settings, but it still comes through as text.

    I'm assume it has something to do with: "app_confirmation_message" I am not familiar with this function, or how to use it.

    I am new to Wordpress, and PHP.

  • Hakan

    First of all, please note that there are some plugins which enables HTML for ALL WordPress emails. There is an article about this even on our website:
    https://premium.wpmudev.org/blog/4-plugins-that-enable-your-wordpress-site-to-send-html-emails/

    But as the article is rather old and I didn't test those plugins, I cannot guarantee that they are still working. Anyway, there must be other plugins which can function for this purpose.

    In any case the solution I have written above is working for me, without an additional plugin.

    function app_modify_headers( $headers ) {
    return str_replace( 'text/plain', 'text/html', $headers );
    }
    add_filter( 'app_message_headers', 'app_modify_headers' );
    
    function add_image_to_email( $body, $r, $app_id ) {
    $img = "<img src='http://cdn.sheknows.com/articles/2012/02/Sarah_Parenting/baby-names-baby-in-towel2.jpg' /><br />";
    return $img. nl2br( $body );
    }
    add_filter( 'app_confirmation_message', 'add_image_to_email', 10, 3 );

    In this example I am adding a baby image to the email. You can see the result in the attached screenshot.

    Cheers,
    Hakan

  • aecnu

    Greetings,

    It appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn't resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

  • aecnu

    Greetings upgradex,

    Thank you for the additional questions and the second question is not related to this thread though I will try to answer it.

    Respectfully the first question is a bit baffling:

    I just looked for functions.php, and could not find it. Where is this file located?

    The functions.php file is usually within the theme files within the root folder of the theme files themselves.

    And considering that Appointments + plugin does not have a function.php file - it must be the theme functions.php that Hakan is referring to.

    Is there also a way to add a footer image?

    Why certainly within the footer.php file in the same location as the functions.php file as described above.

    Coding the footer.php file with the image you desire will certainly get this job done.

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.