The “MailTo” …setting a proper name on the Recipient

后端 未结 8 2306
暖寄归人
暖寄归人 2020-12-30 20:02

How do I set a proper name for the recipient when in HTML I want to use the \"mailto\" tag.

Something like:

mailto:\"John Wayne(jw@email.com)?subject         


        
8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 20:37

    Encode the uri and assign it to mailto.

    Also your email and display name need to be formed as either John Wayne or jw@email.com (John Wayne).

    Make sure you did encodeURI for these. Else it wont work properly in different mailclients.

提交回复
热议问题