My site has been working fine and I have not made any changes to any modules or any code. (In particular, nothing related to the PHP opening or closing tags has changed in any file.)
I changed my SMTP settings from gmail to secureserver.net. With this change, I started getting errors on any form that sends email, including requests for password changes or the site's contact form. If I change back to gmail SMTP, the error goes away. So it only happens on sending email and only with secureserver.net.
I could use some help with this. Thanks.
The log shows this:
Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/smtp/phpmailer/class.smtp.php:1044) in /var/www/drupal/includes/common.inc on line 328.
Here's what the site displays on a web page to the user after any attempt by the site to send email:
SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "220 smtpauth16.prod.mesa1.secureserver.net ESMTP " SMTP -> get_lines(): $data is "220 smtpauth16.prod.mesa1.secureserver.net ESMTP " SMTP -> FROM SERVER: 220 smtpauth16.prod.mesa1.secureserver.net ESMTP SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250-smtpauth16.prod.mesa1.secureserver.net " SMTP -> get_lines(): $data is "250-smtpauth16.prod.mesa1.secureserver.net " SMTP -> get_lines(): $data was "250-smtpauth16.prod.mesa1.secureserver.net " SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN " SMTP -> get_lines(): $data is "250-smtpauth16.prod.mesa1.secureserver.net 250-AUTH LOGIN PLAIN " SMTP -> get_lines(): $data was "250-smtpauth16.prod.mesa1.secureserver.net 250-AUTH LOGIN PLAIN " SMTP -> get_lines(): $str is "250-8BITMIME " SMTP -> get_lines(): $data is "250-smtpauth16.prod.mesa1.secureserver.net 250-AUTH LOGIN PLAIN 250-8BITMIME " SMTP -> get_lines(): $data was "250-smtpauth16.prod.mesa1.secureserver.net 250-AUTH LOGIN PLAIN 250-8BITMIME " SMTP -> get_lines(): $str is "250 PIPELINING " SMTP -> get_lines(): $data is "250-smtpauth16.prod.mesa1.secureserver.net 250-AUTH LOGIN PLAIN 250-8BITMIME 250 PIPELINING " SMTP -> FROM SERVER: 250-smtpauth16.prod.mesa1.secureserver.net 250-AUTH LOGIN PLAIN 250-8BITMIME 250 PIPELINING SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "334 yyyyyyyyyyy " SMTP -> get_lines(): $data is "334 yyyyyyyyyyy " SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "334 xxxxxxxxxx " SMTP -> get_lines(): $data is "334 xxxxxxxxxx " SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "235 Authentication succeeded. " SMTP -> get_lines(): $data is "235 Authentication succeeded. " SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 Sender accepted. " SMTP -> get_lines(): $data is "250 Sender accepted. " SMTP -> FROM SERVER: 250 Sender accepted. SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 Recipient accepted. " SMTP -> get_lines(): $data is "250 Recipient accepted. " SMTP -> FROM SERVER: 250 Recipient accepted. SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "354 End your message with a period. " SMTP -> get_lines(): $data is "354 End your message with a period. " SMTP -> FROM SERVER: 354 End your message with a period. SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 Accepted message qp 15878 bytes 1167 " SMTP -> get_lines(): $data is "250 Accepted message qp 15878 bytes 1167 " SMTP -> FROM SERVER: 250 Accepted message qp 15878 bytes 1167 SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "221 Good bye. " SMTP -> get_lines(): $data is "221 Good bye. " SMTP -> FROM SERVER: 221 Good bye.
Comments
turn off debugging
solved - I made the mistake of leaving SMTP debugging checked. Unchecking resolved the issue (I think).