Desktop productivity for business analysts and programmers

SAS Email: Formatting 'from=' email address display name as "Last, First"

Accepted Solution Solved
Reply
Occasional Contributor k_o
Occasional Contributor
Posts: 5
Accepted Solution

SAS Email: Formatting 'from=' email address display name as "Last, First"

Good afternoon,

 

Lately I've found a great deal of value in automating emails for my report outputs.  In my SAS programs, I have been specifying the from=('first.last@domain.com'), and therefore the automated emails show up as from first.last@domain.com.

 

However, within our company outlook defaults, emails are sorted as "LastName, FirstName".  When a business user searches for one of my reports, they do not appear sorted with my regular emails because of the difference in displayed names.  This prompts the user to ask me to resend my report to them, or they don't even realize I already sent the ad-hoc report.

 

After researching the issue, I found that you can specify a display name by putting the email address in angle brackets (ref1 below).  However, if I use Last, First with a comma, the first name is ignored and the email comes from LastName only.

 

     

from = ('Last, First <first.last@domain.com>') 

       ----> Email shows up from "Last"

 

 

I've tried other variations of nested quotes with no luck, such as from = ('"Last, First" <first.last@domain.com>')

 

Any ideas how I can get the email send to properly display as "Last, First" within outlook?

 

I'm using outlook 2010 32-bit, SAS EG 7.1 HF1, sas server 9.4

 

ref1 - filename statement reference

http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#n0ig2krarrz6vtn...


Accepted Solutions
Solution
‎05-16-2016 05:49 PM
Community Manager
Posts: 2,697

Re: SAS Email: Formatting 'from=' email address display name as "Last, First"

I did a little digging and found that most mailers (SMTP especially) use commas and other characters as delimiters and won't allow you to place them in the "From" field.  This isn't SAS stripping them out -- it's the SMTP libraries (probably) that are at work under the covers.


The only workarounds I've seen involve changing the mailer programs to allow the commas, but I don't think you have access to do that in this case.

 

Of course you can omit the comma, and that will support your sorting.  But I understand that's not the display experience that you want.

View solution in original post


All Replies
Solution
‎05-16-2016 05:49 PM
Community Manager
Posts: 2,697

Re: SAS Email: Formatting 'from=' email address display name as "Last, First"

I did a little digging and found that most mailers (SMTP especially) use commas and other characters as delimiters and won't allow you to place them in the "From" field.  This isn't SAS stripping them out -- it's the SMTP libraries (probably) that are at work under the covers.


The only workarounds I've seen involve changing the mailer programs to allow the commas, but I don't think you have access to do that in this case.

 

Of course you can omit the comma, and that will support your sorting.  But I understand that's not the display experience that you want.

Occasional Contributor k_o
Occasional Contributor
Posts: 5

Re: SAS Email: Formatting 'from=' email address display name as "Last, First"

I was afraid of this - thanks for the research.  I held on to some hope because the email was still being processed correctly, but only the comma-firstname portion was being dropped, so I thought that maybe there would be a clever nested quote or escape character trick that I hadn't unearthed in my searching.  

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 411 views
  • 1 like
  • 2 in conversation