I installed both smtp and forward module, but I found the email format has some problems, please check http://drupal.org/node/168376 for detail. I provided a patch for forward module, it works. And this is another for smtp module, it works too. But I'm not sure is it a correct solution, could you help it ?

btw, this patch is only replace all "text/plain" and ""text/html" to "text/html; charset=utf-8;"

CommentFileSizeAuthor
#2 smtp_0.diff2.66 KBdennys
smtp.diff1.07 KBdennys

Comments

seanr’s picture

Please re-roll the patch per these instructions:

http://drupal.org/patch/create

That'll make it much easier to read and apply. Thanks

dennys’s picture

StatusFileSize
new2.66 KB

Sorry, I'm not familiar with diff command. I use diff -up to create a new patch, thanks for your remind.

scott.mclewin’s picture

That patch simply changes the nature of the problem and moves it around - the root problem still exists. The smtp module is assuming that content-type will be EQUAL to 'text/html' when making the MIME check, rather it should be checking to see whether 'text/html' is contained within the content-type header.

I've rolled a patch with that change here: http://drupal.org/node/195622

oadaeh’s picture

Status: Needs work » Fixed

This issue has been fixed here: http://drupal.org/cvs?commit=90617

dennys’s picture

I upgrade to the newest version 1.15.2.11 2007/12/08 04:03:59 and try to send a test mail through gmail, but I got this error. It's ok in the previous version ...

Error sending email: 'The following From address failed: username@gmail.com' From: 'username@gmail.com' To: 'username@gmail.com'

oadaeh’s picture

Which mail module(s) are you using with SMTP?

oadaeh’s picture

Try changing line 529 of the SMTP module from

    var $SMTPDebug    = false;

to

    var $SMTPDebug    = true;

and see what sort of messages you are receiving from your SMTP server.

dennys’s picture

Status: Fixed » Closed (fixed)

Sorry, it's my fault. I disabled SSL in php.ini, I just turned on it and it's ok now.

This is the debug information.

SMTP -> FROM SERVER: 
SMTP -> FROM SERVER: 
SMTP -> ERROR: EHLO not accepted from server: 
SMTP -> FROM SERVER: 
SMTP -> ERROR: HELO not accepted from server: 
SMTP -> ERROR: AUTH not accepted from server: 
SMTP -> NOTICE: EOF caught while checking if connected

Just a suggestion, is it possible to add a function, when Drupal cannot connect to the smtp server, could it show a error message like "connect server error" ? Because the message in watchdog is
"Error sending email: "The following From address failed: username@gmail.com" From: "username@gmail.com" To: "username@gmail.com" It's not easy to know the root cause.

Thanks for your kindly support.

oadaeh’s picture

Just a suggestion, is it possible to add a function, when Drupal cannot connect to the smtp server, could it show a error message like "connect server error" ? Because the message in watchdog is
"Error sending email: "The following From address failed: username@gmail.com" From: "username@gmail.com" To: "username@gmail.com" It's not easy to know the root cause.

Yeah, I was thinking of doing that after spending a while debugging a problem on my end that turned out to be an incorrect server name. I certainly would have solved it sooner with more or better error messages.

Edit: Oops! I forgot to say that you could certainly create a feature request with that information in there, so this idea doesn't get forgotten.

dennys’s picture

I created 2 feature requests
http://drupal.org/node/199841: I put a patch for it, please help to check it, thanks.
http://drupal.org/node/199843: I have no idea how to implement it now ... sorry

btw, do you consider to release a version of this module ? "smtp 5.x-1.x-dev" is not easy to manage. Maybe from 1.0 or 1.0-beta1, etc...