I have the same problem in the 2 issues:
http://drupal.org/node/131523
http://drupal.org/node/134714

I use smtp 5.x-1.x-dev to send mails through GMail and I test 3 scenarios:
1. Register new user, system will send a mail to new user
2. Use this module to forward a node
3. User Subscriptions module to mail comments to author

But I found only forward module sends mail with "DOCTYPE ...". I checked the source code of forward and SMTP module, I guess the reason is SMTP thinks the mail from forward module is "text", not "html". So, I changed the source code of forward, it's ok now. But I'm not sure is it a correct solution.

Original:

  $headers['MIME-Version'] = '1.0';
  $headers['Content-Type'] = 'text/html; charset=utf-8';

Modified:

  $headers['MIME-Version'] = '1.0';
  $headers['Content-Type'] = 'text/html';

Comments

dennys’s picture

Another issue is although the mail is sent, but I always get a error message in the watchdog log.
Type: error
Message: About to send email to: xxxxxxx
Severity: notice

How do I know this is generated by forward or smtp module?

dennys’s picture

Status: Active » Needs review

Is this patch ok ? It works for me now.

seanr’s picture

Any idea why removing the charset fixes it? I could use a little more info on that, because I was under the impression it was necessary. As for the error, I think that's the SMTP module.

tille’s picture

I just registred with google mail and checked with forward 5.x-1.6 and it looks just fine! ..no formatting errors, no headers hangin, links are working fine, etc..

greetz, till..

tille’s picture

..ahm - with my gmail-related comment I actually refered to this issue: http://drupal.org/node/173016 but I thought it might be about the same problem..

greetz, t..

dennys’s picture

http://drupal.org/node/185643 is another patch for smtp module. This patch is only replace all "text/plain" and ""text/html" to "text/html; charset=utf-8;" of smtp.module. It works for me.

suzanne.aldrich’s picture

There is a better patch for the SMTP module now: http://drupal.org/node/195622

dennys’s picture

Status: Needs review » Closed (fixed)

Please upgrade the smtp module to 2007-12-08, the problem is fixed now.