kinow
Forum Replies Created
-
Forum: Plugins
In reply to: Contact Form 7 errorOssu minna sama!
I dunno if we’re experiencing the same issue… I know only that I couldn’t send mails using Contact Form 7, with a newly wordpress 2.7 installation. My PHP version is 5.2.4, and my server has a sendmail installed in /usr/sbin/sendmail. Just a common web server (Apache) with PHP installed.
I tried, after some googleing, use wp-mail-smtp plugin. But my Yahoo! account seems have problems to let PHP use it as main account to send mails through SMTP (instead of the mail php function + local sendmail). After that, I tried again using Contact Form and wp_mail function. Which, by the way, was using now mail() PHP function to send the mail. Just as you guys should be trying to do now.
After some time thinking about the problems in directly editing the Contact Form 7 Plugin in WordPress Theme Editor, I changed two lines of code and it worked. Seems to be some problem with the headers that the plugin uses when sending mails.
//(...) } //return @wp_mail($mail_recipient, $mail_subject, $mail_body, $mail_headers, $for_this_mail); return @wp_mail($mail_recipient, $mail_subject, $mail_body); } else { //return @wp_mail($mail_recipient, $mail_subject, $mail_body, $mail_headers); return @wp_mail($mail_recipient, $mail_subject, $mail_body); } // (...)
Actually, I thought about it after seeing wp-mail-smtp plugin testing the mail function. In the plugin code, they used the php mail function this way (TO, SUBJECT, BODY) and it worked… while wp_mail function sending the mail_headers parameter was broken.
Maybe Contact Form 7 guys can check what’s wrong with the plugin and the header stuff.
Cheers!!! Yoroshiku!!! ( ^ u ^)v