invalid address
Janam - October 12, 2009 - 20:48
| Project: | Messaging |
| Version: | 6.x-2.1 |
| Component: | PHPMailer |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I switched from the simple mail sending method to the PHPMailer sending method. It works fine when I create forum topics. However I keep getting an error when I create a different content type:
"invalid address: firstname.lastname"
firstname.lastname is my username.

#1
any help with this?
My users receive notifications and the content does get created. However it's just annoying to get a white page stating : invalid username every time I create new content.
#2
Looks like the phpmailer module may have trouble with sender names with a dot.
Please change the user name and confirm this is the issue.
#3
I have seen this error as well, when adding calendar events (not forum for some reason) to my site I get the invalid address error.
The source the warning address is:
"Invalid address: dean <my_address@yahoo.com.au>"I tracked it back to
./sites/all/modules/messaging/PHPMailer/class.phpmailer.php
the function AddAnAddress calls ValidateAddress. passing in the reply to header.
which then traced back to the reply to address in messaging_phpmailer.module, line 167 or so.
I am not sure why this is not manifesting for more people, or what the correct solution is, but commenting out the reply to email header removed the error for me.
if(!empty($message['headers']['Reply-To'])) {// $mail->AddReplyTo($message['headers']['Reply-To']);
}
bit of a cludge, but as I am only specifying an invalid email address, the reply to may as well be empty for my site. It seems that for php 5.2 ValidateAddress uses a different algorithm to validate emails. I am running php 5.2 so perhaps this is relevant to who has the issue or not.
This is my first significant post here, I welcome any comments or requests on the information I provide in my attempt to help. :)
Thanks,
Dean