Hi
The emails from my site generated by userpoints have what seems to be incorrect headers. If a user were to just hit reply, they wouldn't be able to send the email because it contains "From:" and so on.

Here's an example with a fake email addy so bots don't pick it up:

From: admin"@starfleetcoms.comReply-to: admin@starfleetcoms.comX-Mailer: DrupalReturn-path: admin@starfleetcoms.comErrors-to: admin@starfleetcoms.com

Any ideas on how to fix this?

Comments

Cromicon’s picture

I found what was causing it for me anyway.. whether it's server specific or not I don't know as others don't seem to be affected...

Anyway, fix is line 78 of the following code in userpoints_email.module last line in this snippet:

function _userpoints_email_process($uid = 0, $current_points = 0, $new_points = 0) {
  $threshold  = variable_get(USERPOINTS_EMAIL_POINTS,  0);
  $subject = variable_get(USERPOINTS_EMAIL_SUBJECT, USERPOINTS_EMAIL_SUBJECT_DEFAULT);

  if ($threshold && $current_points >= $threshold) {
    $user = user_load(array('uid' => $uid));

    $from = variable_get('site_mail', ini_get('sendmail_from'));
    $headers = "$from";

Original read:

function _userpoints_email_process($uid = 0, $current_points = 0, $new_points = 0) {
  $threshold  = variable_get(USERPOINTS_EMAIL_POINTS,  0);
  $subject = variable_get(USERPOINTS_EMAIL_SUBJECT, USERPOINTS_EMAIL_SUBJECT_DEFAULT);

  if ($threshold && $current_points >= $threshold) {
    $user = user_load(array('uid' => $uid));

    $from = variable_get('site_mail', ini_get('sendmail_from'));
    $headers = "$from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from";
Cromicon’s picture

duplicate post.

jredding’s picture

Project: User Points » User Points Contributed modules
Version: 5.x-2.14 » 5.x-2.x-dev
berdir’s picture

Status: Active » Closed (won't fix)

Sorry for pinging the participants.

Now that Drupal 7 is out, there is no support for Drupal 5 and the
corresponding modules anymore. Therefore, I'm closing all old issues
which are still open.

I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature
is still needed or the bug still exists and open a new issue in that
case.