none
FIM SMTP sendAsAddress displayName options? RRS feed

  • Question

  • Hi, we have configured FIM to use a Google smtp gateway based on Brad's great post.  All is working well and FIM is able to successfully send email to a Google Apps instance which we use for corporate email.  We have gotten a request to change the display name of the FIM email account that notifies end users so the address appears as something friendly in their email box instead of "fimmailbox@acme.com".  The specific request is to change the display name in the email from "fimmailbox@acme.com" to "Acme Provisioning Team".  Sounds like this should be simple to do but we are stuck.

    1. We confirmed that "fimmailbox@acme.com" has the friendly name "Acme Provisioning Team" set in Google apps.  When we manually go in to the Google Apps mailbox and send directly from Google mail, the desired display name appears.
    2. However, when FIM sends the notification the "from" display name appears as "fimmailbox@acme.com" instead of "Acme Provisioning Team".
    3. We attempted to modify Microsoft.ResourceManagement.Service.exe.config  and updated <add key="sendAsAddress" value="Acme Provisioning Team<fimmailbox@acme.com>" />  when we restart the FIM Service it bombs out so we reverted back to <add key="sendAsAddress" value="fimmailbox@acme.com" />.
    4. We created a .net console smtp app and ran it on the FIM service server to see how it would react. This code gives us the desired email format as well. 

    try
                {
                    MailMessage mailMessage = new MailMessage();
                    mailMessage.To.Add("my.testaccount@acme.com");

                    //**Key line, this gives desired format option!
                    mailMessage.From = new MailAddress("Acme Provisioning Team<fimmailbox@acme.com>");

                    mailMessage.Subject = "FIM Welcome Email";
                    mailMessage.Body = "FIM Rocks!";
                    SmtpClient smtpClient = new SmtpClient("localhost");
                    smtpClient.Send(mailMessage);
                    Console.Write("E-mail sent!");
                }
                catch (Exception ex)
                {
                    Console.Write("Could not send the e-mail - error: " + ex.Message);
                }

    The question at hand is how can we configure FIM to show the desired display name like we do here?

    //**Key line, this gives desired format option!
    mailMessage.From = new MailAddress("Acme Provisioning Team<fimmailbox@acme.com>");

    Cheers!


    Thursday, October 10, 2013 2:07 PM

All replies

  • Ok, someone must have run into this before!  Any thoughts?
    Friday, October 11, 2013 1:45 PM
  • This doesn't surprise me. I've not personally run in to this before or heard of someone working around this. You might want to consider opening a case with PSS and see if you get anywhere with that angle.

    Thanks, Brian

    Friday, October 11, 2013 3:45 PM
    Moderator
  • I know this thread is really old, but in case someone else needs this solution.

    FIM_Admin was on the right track, but didn't XML-encode the angle brackets. This would cause the FIMService to crash upon starting as the config file is now invalid XML.

    The correct syntax is 

     <add key="sendAsAddress" value="Acme Provisioning Team&lt;fimmailbox@acme.com&gt;" /> 

    Tuesday, October 23, 2018 3:06 AM
  • Thanks for that Ryan!

    Senior Technical Consultant - Microsoft Identity & Security


    Friday, April 24, 2020 1:31 PM