PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

HTML Email notifications

  1. I am trying to send email notifications in a nicely formatted template with css, but it comes through all wacky looking, when I look at the source, it puts a after each line...(see below) - how can I stop it doing this?

    Great plugin by the way..10/10

    <html>
    <head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       <title>twenty4 contact form</title>
    
    <STYLE>
    body {
       background-color: #e6e6e6;
       background-position: top center;
       background-repeat: no-repeat;
       margin: 0;
       padding: 30px 0 10px;
    }
    
    table {font-family: Helvetica,"Helvetica Neue",Arial,sans-serif; font-size: 0.95em; color: #222222;}

    etc. etc.

    Posted 14 years ago on Wednesday March 31, 2010 | Permalink
  2. oops, obviously it didn't but the br's in, anyway, after each line there is a br tag which I don't want

    Posted 14 years ago on Wednesday March 31, 2010 | Permalink
  3. First thing you will want to do is don't treat it as a full HTML page. Don't include the <html>, <head>, etc. and only place the actual body of the email in the notification body as HTML.

    Most email clients strip out everything else and don't show HTML, etc. When you think about it, it makes sense because web clients like GMail are already showing the email within an existing page so it's not going to duplicate this markup.

    Also keep in mind that it is better to use inline styles that declared style blocks for compatibility.

    Try doing the above and let me know if the BR issue still happens.

    If it does we may need access to the admin for this site so we can take a look at your notification setup and see what is going on.

    Posted 14 years ago on Wednesday March 31, 2010 | Permalink
  4. Hi Carl,

    Thanks for the reply but that's not really the problem, the problem is that at the end of each line a <br /> tag is being added in automatically. This is great for people who have a simple form and I can understand why you did that to make it easier, but for me it's not what I want. The same code works fine in Contact 7 and sends a nicely formatted HTML email. If I put all the code on one line it would work also but it's not really an option.

    There must be a way to stop the code adding in the <br /> tags, I've had a quick look in the notifcations.php file but can't seem to find where to do it.

    cheers,

    Matt

    Posted 14 years ago on Thursday April 1, 2010 | Permalink
  5. It shouldn't be adding the BR's automatically and when testing locally I don't run into this problem. We would need a WordPress admin login for this site in order to look into it further. You can send this to us via our Contact Us form.

    Posted 14 years ago on Thursday April 1, 2010 | Permalink
  6. I am having a similar issue! My notification set up looks right on the notification set up in gravity forms, but once it arrives at my end user's email it is really wonky, and prints wrong too. Blargh.

    Posted 12 years ago on Sunday August 26, 2012 | Permalink
  7. Can you please post a link to the form, and ensure that the user notification I will receive will have the problem you mentioned? If not, please export the form as XML (Forms > Import/Export > then "Export Forms" from the top menu) and email it to me at chris@rocketgenius.com and I will install it and see if I have the same problem with the notifications.

    Posted 12 years ago on Monday August 27, 2012 | Permalink
  8. Please also see this recent topic where there was a similar problem which was solved.
    http://www.gravityhelp.com/forums/topic/excessive-breaks-in-email-notification

    Posted 12 years ago on Monday August 27, 2012 | Permalink
  9. I am sending the email now.

    Posted 12 years ago on Monday August 27, 2012 | Permalink
  10. Thanks. I will take a look at that on Monday.

    Posted 12 years ago on Monday August 27, 2012 | Permalink
  11. I really appreciate it. I'm getting really frustrated. I love GF, and I love the Thesis Theme, but this is really rocking my boat. The email notifications look right in the visual on the email notification screen (it's the admin one that is burning me), but when it shows up in the admin's inbox, the vertical spacing is bananas! I really hope that this is something we can resolve quickly and I can learn from soon. It's taking up a lot of my time and causing me stress...

    Posted 12 years ago on Monday August 27, 2012 | Permalink
  12. Kate, I emailed you with some additional questions.

    Posted 12 years ago on Tuesday August 28, 2012 | Permalink
  13. @Kate, I think the only issue is that you need to check the box beneath the notification which says "Disable Auto-formatting". Since you coded all your own HTML for form 2, you don't want any additional markup introduced there. I exported your form and installed it on my server and tried it, and had a lot of whitespace in the admin notification. Then I checked the box to disable auto-formatting and submitted again and it was much tighter.

    Give that a shot and let me know.

    Posted 12 years ago on Tuesday August 28, 2012 | Permalink
  14. Update: this fixed the problem.

    Posted 12 years ago on Wednesday August 29, 2012 | Permalink

This topic has been resolved and has been closed to new replies.