I had issues with the SMTP setup on GoDaddy using Windows hosting (haven’t tried it on Linux). Pretty much any call to wp_mail() fails. The SMTP server apparently doesn’t like “Bare LF”.
The problem ended up being line breaks. If there was a \n in the content, the send would fail. If it was \r\n it would work. I think this goes for the headers as well. I was never able to get wp_mail() to work (which ultimately uses PHPMailer) but I was able to bypass it and use the regular old mail() function. This took me forever to figure out, so I hope it helps if this is your problem.
function send_mail($to, $subject, $message) {
$subject = ‘[‘ . get_bloginfo(‘name’) . ‘] ‘ . $subject;
// strip out some chars that might cause issues, and assemble vars
$site_name = str_replace(‘”‘, “‘”, $this->site_name);
$site_email = str_replace(array(‘<‘, ‘>’), array(”, ”), $this->site_email);
$charset = get_settings(‘blog_charset’);
$headers = “From: \”{$site_name}\” <{$site_email}>\r\n”;
$headers .= “MIME-Version: 1.0\r\n”;
$headers .= “Content-Type: text/plain; charset=\”{$charset}\”\r\n”;
$message = str_replace(“\r\n”, “\n”, $message);
$message = str_replace(“\r”, “\n”, $message);
$message = str_replace(“\n”, “\r\n”, $message);
$message = trim($message);
$result = mail($to, $subject, $message, $headers);
return $result;
//wp_mail() doesn’t work
//return wp_mail($to, $subject, $message, $headers);
}