Emailing to multiple recipients with html Mailto: not working

后端 未结 7 2243
旧时难觅i
旧时难觅i 2020-12-02 00:00

we have 400 to 500 hundred emails, when we concatenate them and put them in mailto: it does not work, browser automatically adds \"...\" in between emails and clicking link

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 00:08

    Its a bad practice, its barely possible. Try to rethink your script.

    RFC 1783 (URLs) says that a mailto: URL takes an RFC822 address specification. RFC822 is obsoleted by RFC2822; and RFC2822 says that an address specification can include a mailbox-list, which is a comma-separated list of mailboxen. I conclude that what you are trying to do is permitted.

    However UA support for "mailto:" is at best patchy; the recommendation is to avoid it completely, or failing that restrict yourself to specifying a single address.

    Attempting to include a subject, in particular, will definitely not work in all UAs. Also note that

    It is much better to use a formmail script. That will give you the kind of versatility you appear to want, while completely sidestepping the mailto: URL scheme, the deficient browser support that it implies, and the question of whether any email UA is configured in the first place.

    credits: http://bytes.com/topic/html-css/answers/496355-multiple-addresses-mailto

提交回复
热议问题