im receiving the following error when im trying to send e-mail "Invalid address: "=?UTF-8?B?SWJpw7puYSBNYWlz?=" " what it can be? :(

Comments

boabjohn’s picture

Perhaps I can join in here...

I have just set up Simplenews (6.x-2.x-dev) running through HTML Mail module and am getting this error when I send newsletters:

Invalid address: "From Name"  

This appears on a blank white page with url as /node/xx/edit...no clue as to who is throwing the error.

The "Invalid address" above is the "from name" provided in Simplenews configuration (/admin/settings/simplenews/newsletter)

Email actually sends fine.

Inspecting Watchdog, I see this error for each of my test sends:

Cannot modify header information - headers already sent by (output started at /home/mysite/prod/htdocs/drupal/sites/all/modules/smtp/phpmailer/class.phpmailer.php:464)  in /home/mysite/prod/htdocs/drupal/includes/common.inc  on line 345.

This has me stumped. I came up with this thread as the most likely match: http://drupal.org/node/128832

But I'd have no idea where to start looking for errant whitespace.

Simplenews does not produce this error: with Sutharsan's help I grepped for Invlaid address and found:

./smtp/phpmailer/test/phpmailerTest.php: $this->assertFalse($this->Mail->AddAddress('a@example..com'), 'Invalid address accepted');
./smtp/phpmailer/class.phpmailer.php: 'invalid_address' => 'Invalid address',

./messaging/messaging_phpmailer/PHPMailer/test/phpmailerTest.php: $this->assertFalse($this->Mail->AddAddress('a@example..com'), 'Invalid address accepted');
./messaging/messaging_phpmailer/PHPMailer/class.phpmailer.php: 'invalid_address' => 'Invalid address',

./phpmailer/phpmailer/class.phpmailer.php: 'invalid_address' => 'Invalid address',
./phpmailer/phpmailer/PHPMailer_v5.1/test/phpmailerTest.php: $this->assertFalse($this->Mail->AddAddress('a@example..com'), 'Invalid address accepted');
./phpmailer/includes/phpmailer.class.inc: 'invalid_address' => 'Invalid address',

Running smtp: smtp.module,v 1.17.2.12 2009/11/10 17:03:10, patched class.phpmailer.php.2.0.2 and class.phpmailer.php.2.2.1

Will check out the phpmailer and messaging queues now...

drm’s picture

I am getting exactly the same error as boabjohn, in this case from an email that Webform is trying to send. This is the email that goes to the admin person who gets notices that a submission was made. My log error is exactly the same as his is.

franz’s picture

I think there was a whitespace in a translation file or something, inside phpmailer... not sure thought

sampeckham’s picture

Same problem here. I receive the white page with this message after posting comments using Watcher (it sends a notifcation email when comment is posted). Sometimes the message is repeated 2 or three times too.

sampeckham’s picture

Bad form and not a solution i know, but I've commented out lines 459 to 467 of class.phpmailer.php and everything is working fine. I guess if the you know your address is valid it's not a major issue - but i'll be watching to see anyone can track down the real solution.

aberg’s picture

do you mind telling me which are these lines? In my version line 459 is a comment

dandaman’s picture

I'm using PHPMailer version 5.1. On lines 464 and 496 of class.phpmailer.php the following appears:

echo $this->Lang('invalid_address').': '.$address;

Once I commented out both of these lines the Invalid address: "From Name" message no longer appeared instead of the Webform's thank you message.

gregor171’s picture

This is an issue of mime_header_encode and I reported a problem. I'd discourage you to comment out PHPMailer functions since they work fine.

To FIX

this problem you can comment out lines that cause this issue in webform.module lines in function webform_client_form_submit around 1829 line:

/*  
 elseif (drupal_strlen($email_from_name) > 0) {
       $froms[$cid] = '"'. mime_header_encode($email_from_name) .'" <'. $email_from_address .'>';
      }
*/

Sorry I dont have time to go into mime_header_encode function.

franz’s picture

Version: 6.x-1.0-beta4 » 6.x-1.x-dev
Status: Active » Closed (fixed)

Ok, then the issue does not belong in SMTP. Anyway, if it is a core issue, has it been reported yet?

I'll close this, please reopen in case it still applies.

aberg’s picture

We finally fixed this problem by simply overwriting the from address in the config of the 'SMTP Authentication Support' module. I think somehow some UTF8 values slipped in and started causing the problems.