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
Comment #1
spring.oracle commentedPossible duplicate of: http://drupal.org/node/1686588Edit: that one is for Drupal 7.x
Comment #2
ericwongcm commentedI 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
Comment #3
wundo commentedClosing very old (dead) issues, if you think this is still relevant please re-open.