I installed mimemail and phpmailer. In the settings page, test mail sending is successful. But in code, i should use drupal_mail or mimemail ? I tried these two functions, always failed on "SMTP error: could not authenticate".


sgabe’s picture

  1. You need to set the SMTP (or PhpMailer) mailengine on Mime Mail's configuration settings page.
  2. You need to prepare (without sending!) the $message with drupal_mail() first, then call mimemail() with the result, see Simplenews for example.
yaoweizhen’s picture

Status:Active» Closed (fixed)

The problem is always on my local, never mind. Worked on the server. I will check the simplenews module.