Author Topic: Importing email addresses like o'malley@domain.com  (Read 1316 times)

dave3

  • Posts: 4
    • View Profile
Importing email addresses like o'malley@domain.com
« on: May 09, 2006, 06:50:15 pm »
Hi,

I looked around for a solution to this but I am unable to import email addresses with apostrophes in them like prud'homme@mail.com or o'malley@mail.com etc..  I have tried backslashing the apostrophe  ie \'  and using the entity value to no avail.

Any other ideas?

Thanks in advance

Dave

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Importing email addresses like o'malley@domain.com
« Reply #1 on: May 10, 2006, 05:16:27 pm »
Try changing this in admin.php:
Code: [Select]
if(!function_exists('valid_email')){
 function valid_email($xe) {
  if(strpos($xe,'\\')===true) return false;
  if(ereg("^[\._a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.([a-z]){2,4})$", strtolower($xe))){
   return true;
  } else {
   return false;
  }
 }
}

To this:
Code: [Select]

if(!function_exists('valid_email')){
 function valid_email($xe) {
  if(strpos($xe,'\\')===true) return false;
  if(ereg("^[\._a-z0-9'-]+(\.[_a-z0-9'-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.([a-z]){2,4})$", strtolower($xe))){
   return true;
  } else {
   return false;
  }
 }
}

I have updated the code for future releases.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

dave3

  • Posts: 4
    • View Profile
Importing email addresses like o'malley@domain.com
« Reply #2 on: May 10, 2006, 05:33:46 pm »
Thanks Dean,

I will do that before my next import!

Dave