Mark- 29 Posted April 26, 2022 (edited) Hello, We and our customers have used many email servers/services to send notification emails. A customer wanted to use Outlook.com and was unable to send a test message. Normally we put the email address in the “RcptName” list and the person’s name in the “HdrTo” property. I investigated and found Outlook.com required the header “to” field must be or contain the email address. We used: RcptName.Add('example@123ABC.com') HdrTo:=’Bob’ With OutLook.com we had to use: RcptName.Add('example@123ABC.com') HdrTo:= 'example@123ABC.com' Or RcptName.Add('example@123ABC.com') HdrTo:= 'Bob <example@123ABC.com>' Anyone predict a problem using: “HdrTo:= Bob <example@123ABC.com>” with all servers/services? Thanks, Mark Edited April 26, 2022 by Mark- Share this post Link to post
Angus Robertson 577 Posted April 26, 2022 RcptName name is used for the SMTP protocol, HdrTo is used to build the message header, and it is normal for that to have friendly name and email address. The component does not add them together, although some SMTP forwarders and POP3 servers may do so. RcptName is sometimes added by servers as X-To: header or similar. Angus Share this post Link to post
Mark- 29 Posted April 26, 2022 (edited) Hello, Thanks for the reply. >...it is normal for that to have friendly name and email address. Good, so I will make the change to send both in all instances. Cheers, Mark Edited April 26, 2022 by Mark- Share this post Link to post