سؤال

I wrote a form using the Form API in Drupal 6. Everything else works fine, but can I write a header Reply-to rather than the drupal_mail using the From value?

I tried putting this into my regular hook_mail function inside my module:

  $message['Reply-to'] = $my_email; //$my_email had been previously configured to be $form_state['values']['info']['email']

Is there a non-hacky way to do this? We have a multisite install controlled by a sysadmin so I can't go into the core changing things.

هل كانت مفيدة؟

المحلول

The from address is a parameter to the drupal_mail function: drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE) I'd also suggest using the mimemail module for some additional features: http://drupal.org/project/mimemail

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top