SBS exchange 2003 

An internal user is trying to send an email to another user on the same domain but the 2nd user in not in the AD or in exchange but exchange gives a NDR without sending the email to the mail provider.

How can i get exchange to send the email to the mailprovider without adding the 2nd user to the AD and/or exchange?


Question: SASS Index in nested list
Answer: It sounds like what you're talking about is a hash or lookup table, which Sass does not currently have. However, you can easily work around that in a variety of ways. Here are some examples.

You could structure your list a little differently:

$icons : (
  'arrow--down--full', '\e806', /* '' */
  'cog', '\e805', /* '' */
  'info', '\e807', /* '' */
  ...
);


I've added a comma after each item. Now to look it up you'd write a function like

@function lookup($list, $key) {
  @return nth( $list, ( ( index($list, $key) ) + 1) );
}


And call it like so

lookup($icons, 'cog'); // =&gt; '\e805'


You could push this a little further by making 2 different lists and then associating them via a similar function:

$icon-keys:    ('arrow--down--full', 'cog',    'info' ... );
$icon-values:  ('\e806',             '\e805',  '\e807' ... );


I've lined up the values with whitespace only to make them more legible to me so that they appear a bit like an actual table, but there are tons of ways of writing Sass lists, and you may prefer another. Then the function that associates them:

@function lookup($lookup-key, $all-keys, $all-values) {
  @return nth($all-values, index($all-keys, $lookup-key));
}


And using it:

lookup('cog', $icon-keys, $icon-values); // =&gt; '\e805'


For my tastes, these are both a bit clunky so I'd make a shortcut function to make it a bit more legible:

for the first variation:

@function icons($lookup-key) {
  @return lookup($icons, $lookup-key);
}


for the second:

@function icons($lookup-key, $types: $icon-keys, $values: $icon-values) {
  @return lookup($lookup-key, $types, $values);
}


so you could just in either case call

icons('cog');


You'd probably want to put a little more logic in your lookup functions to error catch, and you could also expand it to both accept and return a list rather than a single value, but this is just a basic example.