Can't change default "from address"

Created on 17 July 2012, over 12 years ago
Updated 21 November 2024, 5 months ago

The default behave of Drupal is to set site-mail as "from address" if none is passed as parameter in drupal_mail. A mail server might be configured to not allow a authentication user to use another "from address". In this case, an email will be sent only if another module change the "from address", e.g. webform.

Since phpmailer enable to set an SMTP authentication user, it also should allow to set the default "from address" as the authentication user, or maybe any other than site-mail.

A workaround solution is set site-mail as the authentication user, but site-mail is an info related to the site itself not SMTP authentication. As site-mail should receive emails, a dumb "no-reply" SMTP user could not be used here.

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇧🇷Brazil moskito

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany paul_constantine

    Hi there,

    found this because I have the same problem.

    E-Mails from the website e-Mail address (which is also used to authenticate at the external mailserver) work and are sent.

    E-Mails to the website contact form do NOT work since they use the E-Mail address that the user who's contacting the website. And that E-Mail address can not authenticate itself at the external mailserver and is refused.

    But every website needs a working contact address.

    What now?

    Regards
    Paul

  • 🇩🇪Germany paul_constantine

    Solved my problem with this module:

    Contact Reply-To

    If you enable this module, the "From" address on contact emails, both site emails via the contact form and user-to-user emails via the member contact form, will be "From" the email address configured in site_mail (admin/config/system/site-information in d7). The reply-to header will be set to the address that Drupal would have used as the From address.

    You find it here .

    Regards
    Paul

Production build 0.71.5 2024