0 Replies Latest reply on May 3, 2009 6:11 PM by coltrane42

    Can Nicknames be included on email addresses in the "setTo" Parameter?

    coltrane42 Level 1

      Hello all,

       

      I was just wondering if anyone out there knew if it might be possible to include a nickname before the email address in the "setTo" parameter of the email trigger?  My code email trigger code is roughly as follows below:

      (I've replaced the dynamic information with static information just for simplicity)

       

       

      function Trigger_SendEmail(&$tNG) {
      $emailObj = new tNG_Email($tNG);
      $emailObj->setFrom("Site Name <emailaddress.com>");
      $emailObj->setTo("John Smith <emailaddress.com>");
      .....
      return $emailObj->Execute();
      }

       

       

      My emails are being sent out successfully, but when I examine the full message headers I notice that the nickname component of the email address is missing entirely ("John Smith").

       

      I have tried using double quotes around the name (with \ characters before them), using single quotes around the name, and also just simplifying the name entirely down to a single word... but nothing seems to work.  I am starting to suspect that it's just not a supported function, but that seems odd since the nickname seems to come through just fine on the "setFrom" parameter (meaning that the "Site Name" shows up before the "emailaddress.com" email address in the message headers).

       

      This may not really be that big of a deal at the end fo the day, but I'm trying to do everything I possibly can to help get my application's emails through SPAM filters (which is proving to be somewhat of a nightmare).... especially on the activation emails for new users!  Yikes...

       

      Anyways, I would greatly appreciate any help or guidance that any of you might have to offer.

       

      Thanks for your time