When trying to submit an email as an authenticated user, my email ends up being in the form "me@here.comme@here.com" which is rejected by the form as an invalid email.

CommentFileSizeAuthor
#5 forward-363675-problem-with-mail.patch700 bytesanantagati

Comments

jsr47’s picture

Just to expand, I'm really unsure where the problem is occurring. I've used FirePHP to debug the values for the from header, and the $params['from'] header is correct right up to the drupal_mail() call. Does this suggest the mangling is occurring outside the module? I think it might...

I'm using the smtp_authentication and PHPMailer modules.

jsr47’s picture

OK, I found where the problem is.

In the forward.module in the function forward_mail:

$message['from'] .= $params['from'];

This creates a problem if $message['from'] already has a value. Changing this line to:

$message['from'] = $params['from'];

solves the problem I am seeing.

mzenner’s picture

works for me now, thanks

jsr47’s picture

Glad it helped someone else!

anantagati’s picture

Status: Active » Needs review
StatusFileSize
new700 bytes

Thank you for discovering. Here it is attached in patch.

seanr’s picture

Status: Needs review » Fixed

That function is fairly different now and no longer sets from in forward_mail. Reopen if you're still experiencing this issue with the current version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.