When user post form on example.com/contact, error report generated to log:
"Error sending e-mail from @from" , where @from is user input data from Contact form.
SMTP server can't send e-mail from this email, because drupal authenticate user given in preferences of smtp module.

in function smtp_drupal_mail_wrapper($message) :
...
$from = message['from'];
...
and $from only changes to smtp_from or site_email if blank
...
$mail->Sender = $from;

I have changed smtp.module
421: $mail->Sender = $from;
to
421: $mail->Sender = variable_get('smtp_from',$from);

it's dirty, but it works.
Is this fix correct?

Comments

spring.oracle’s picture

Possible duplicate of: http://drupal.org/node/1686588
Edit: that one is for Drupal 7.x

ericwongcm’s picture

Version: 6.x-1.0-beta5 » 6.x-1.1
Issue summary: View changes

I experienced exactly the same problem using the latest code 6.x-1.1.. I didn't figured out how to fix this module but I use another module instead, which didn't have such problem...

I used
https://www.drupal.org/project/phpmailer

wundo’s picture

Status: Active » Closed (works as designed)

Closing very old (dead) issues, if you think this is still relevant please re-open.