Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter WPmaverickzee

    (@wpmaverickzee)

    Everything was working great until I updated WP to 4.2.2. The SendGrid plugin was failing silently. No error messages. My client lost about 15 quote-request leads the afternoon I upgraded WP. It was urgent to find a solution that worked immediately. I was hoping for a quick reply. 3 weeks to reply makes it look like support is an afterthought.

    It appears a function was removed from WP. I had to add this missing function to change the email into an HTML email.

    function set_html_content_type( $content_type ) {
    return “text/html”;
    }

    Then after I clean the inputs for spam and hacking activity, I send the email:

    add_filter(‘wp_mail_content_type’, ‘set_html_content_type’);
    wp_mail( $sendto, $subject, $message, $headers );
    remove_filter(‘wp_mail_content_type’, ‘set_html_content_type’);

    My understanding is that SendGrid plugin takes control of sending emails from the wp_mail() function. It does’t really matter what code comes before or after wp_mail(), SendGrid is going to send the email instead of the website, and that’s what I want.

    But still, with the missing function added in, SendGrid didn’t work. No matter what I tried, I could not get SendGrid to work again. I probably spent 12 hours identifying the problem and trying to get it working again. I deactivated SendGrid plugin and installed and activated the MailChimp for WordPress plugin and it worked perfectly.

    Also, I could see my emails (from the quote request form) going through SendGrid. They were listed in the log of emails sent, but I would never receive any email. I tested a bunch of different email addresses and checked the spam folder and they never arrived. I was nowhere near the daily limit of emails sent. Then I would send a test email from the SendGrid setting page inside WP admin and I would get the test email immediately. Totally weird. Makes no sense.

    I’m going to mark this topic as resolved because it appears that nobody else is having this problem.

    My site just went live and the redirects are not working to the new URL’s. Would you like to see a screenshot of my Custom Redirections screen?

    Thread Starter WPmaverickzee

    (@wpmaverickzee)

    I’ll answer my own question. SendGrid works well with WordPress.

    The problem was my code. I was displaying a copy of the email on the thank-you page. The $from variable needs to be written like this $from = ‘someone <[email protected]>’; But to display that on the page, you need to use html chars < and > instead of angle brackets. You need to create two different variables and use the angle brackets with wp_mail(); and use html chars version to display the info on the page.

    Most people are just going to use something like ContactForm 7 to create a web form on their WP site. There are no special configurations needed. Just create a form with ContactForm 7, and install SendGrid, and the form is sent using SendGrid. Yes SendGrid is easy to integrate with WP.

    Thread Starter WPmaverickzee

    (@wpmaverickzee)

    Great idea. If that works it would make it so much easier to do. I didn’t think it was possible for the blog header to know if it’s inside an iframe. You’re right, all I need to do is serve up a different stylesheet if the blog is inside the iframe. I’ll do some searches and see what I come up with. Thanks.

    Thread Starter WPmaverickzee

    (@wpmaverickzee)

    Sorry, I’m trying to keep it simple but it’s not working.

    We have an old corporate website that has nothing to do with WordPress. It doesn’t even use PHP. It’s mainly used for some customer service support. The marketing department set up their own WordPress blog at a different URL. I have access to their blog files, and I also have access to the corporate website files (on a different server).

    Now management wants to show the blog in an iframe on the corporate site, in a different style, without changing anything on the marketing blog.

    Why not just include a link to the blog? Because management doesn’t want to lose the customer to the blog site URL. When someone clicks on post links in the iframed-blog, they would continue to see the blog in the different theme. The marketing guys would continue to get traffic to their WordPress blog and make new posts and approve comments. They would continue to use their existing blog URL.

    I think if I set up a sub-folder on the blog, I could point to the sub-folder in the iframe on the corporate site, and voila, I have a blog in an iframe on the corporate site in the simplified style that they want. In theory it should work. Thanks.

    Thread Starter WPmaverickzee

    (@wpmaverickzee)

    Well it’s not actually for mobile users. I used /mobile/ as an example because it would be easy to explain. If it was for mobile users, yes using a mobile plugin or mobile stylesheet would be easier than trying to install another WordPress in a sub-folder.

    What I’m trying to do is to add our existing blog to an existing corporate website (at a different URL) without the user getting out of the corporate website. I want to use an iframe in the corporate site to show the blog. This is why I need to create a separate sub-folder to show the same content in a different style. When someone clicks the blog links in the iframe, they need to stay in the sub-folder to keep the same style. Someone visiting the real blog would never see the sub-folder links. This is what management wants.

    It looks like I need to do two installs and import the data into the second install.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)