Saturday, July 30, 2016

Wordpress Fatal error: Call to undefined method PHPMailer::getCustomHeaders()


With numerous new themes and new versions of the wordpress, when you try to publish some post or page or try to send email or try to use contact form, you might get following error:


Fatal error: Call to undefined method PHPMailer::getCustomHeaders()







This error normally occurs if you are using incompatible wordpress and theme and plugin versions. The best course of action is to update your wordpress, your theme, and all the plugin and make sure that contact form 7 plugin isn't complaining about the wordpress version.

If you cannot upgrade your versions or if the error is occuring even after the upgrade, then you can do the following workaround:

Workaround:

Make the following change in your mail.php file in the directory wordpress/wp-content/plugins/contact-form-7/includes

Go to the line 171 and change:
 
add_action( ‘phpmailer_init’, ‘wpcf7_phpmailer_init’ );


to
 

//add_action( ‘phpmailer_init’, ‘wpcf7_phpmailer_init’ ); 

Hope that helps.

21 comments:

Karthika Shree said...

This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
Java Training in Chennai

sunitha vishnu said...


This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Android Training in Chennai
Ios Training in Chennai

Jack son said...

So it is required that subjects and modules must be good with the most recent form of WordPress. https://www.templatemonster.com/blog/profitable-upwork-projects-web-designers/

Adiba Alam said...

It is the obligation of the system organization to discharge the refreshed and perfect adaptation of topic, when you are utilizing paid subject.https://www.templatemonster.com/blog/periodic-table-of-html-tags-infographics/

alex mark said...

Be that as it may, this does not occur with free subjects; here you need to sit tight for a month to see an update. All the paid subject creator offers free support, however in free topics, you can't expect a free support. https://www.templatemonster.com/blog/make-first-money-internet/

seo boss said...

Absence of additional component and usefulness If you are searching for some additional element and usefulness in free topic then you need to baffle. https://www.templatemonster.com/blog/raising-brand-awareness-get-noticed-across-social-media/

Philip T. Greene said...

Security chance WordPress refresh innovation consistently, the paid topics are refreshed and no security issue. https://www.templatemonster.com/blog/start-product-review-site/

Keith A. Grant said...

In free topics, engineers top off topic document with malevolent codes and spam joins, which brings about terrible client encounter.
https://www.templatemonster.com/blog/templatemonster-story-ebook/

Betty M. Dickerson said...

Bolster Premium WordPress subject accompanies lifetime bolster. You will find solutions to the vast majority of your inquiries in the bolster gatherings. https://www.templatemonster.com/blog/how-to-create-prestashop-store/

Patricia P. McNeil said...

Security-Premium subjects are produced by constant WordPress engineers taking after strict and high web standard coding. So no security vulnerabilities here, which implies you don't have to stress over any noxious and spam joins. https://www.templatemonster.com/blog/create-shopify-store/

Andrea R. Williams said...

Additional component and usefulness Premium subject accompanies expanded elements and functionalities including gadgets, augmented capacities and considerably more. Typically these topics are anything but difficult to alter and developed.
https://www.templatemonster.com/blog/creado-grid-css-wordpress-theme/

seo boss said...

Search engine optimization SEO is the basic piece of advanced advertising, Web outline and improvement organization accentuate on premium subject, since premium topics are upgraded for the site and offer inbuilt SEO alternative. https://www.templatemonster.com/blog/how-to-create-woocommerce-store/

Ishu Sathya said...

my website also facing the same issue. your blog helps me to solve the issue. Thank you
java training in t nagar  |
java training in anna nagar

Anoushka Sakthi said...

Wonderful Blog!!! Your post is very informative about Data Management. Thank you for sharing the article with us.

Hadoop Training Chennai |
Big Data Training

jhansi joe said...

Thanks for your informative article. Java is most popular programming language used for creating rich enterprise, desktop and web applications. Keep on updating your blog with such informative post. J2EE Training in Chennai | JAVA Training in Chennai| JAVA Course in Chennai

Shalini Mudhalayar said...

It is natural to make mistake while developing your application as a developer. Keep updating more knowledge on Software testing. Selenium is the best automation testing tool to test any application.

Selenium Training in chennai |
Selenium Course in Chennai

toko tangerang said...

obat-pembesar-penis-klg-pills

jhansi joe said...

Great and impressive article!! Got to learn and know more about web development. To know more refer create website for much more unique ideas.PHP Training in Chennai | Best PHP training in Chennai

for IT the said...

Great & Useful Blog. Helped me a lot.
PHP Training in Chennai
PHP Online Training India

Melisa said...

Excellent post,. share more article related with this stuff.
Regards,

DOT NET Course Chennai|DOT NET Training Institute in Chennai

katemi katemi said...

I like the post format as you create user engagement in the complete article. It seems round up of all published posts. Thanks for gauging the informative posts.
cara menggugurkan kandungan
obat aborsi
kalkulator kehamilan
tanda tanda kehamilan