프로그래밍 언어/HTML,CSS,JS
mailto :를 사용하여 이메일 제목 / 내용을 설정하는 방법
Rateye
2021. 10. 1. 12:18
728x90
반응형
질문 : mailto :를 사용하여 이메일 제목 / 내용을 설정할 수 있습니까?
mailto :를 사용할 때 이메일 제목 / 내용을 설정할 수 있습니까?
답변
예, mailto에서 모든 팁과 요령을 확인하세요. http://www.angelfire.com/dc/html-webmaster/mailto.htm
mailto 제목 예 :
<a href="mailto:no-one@snai1mai1.com?subject=free chocolate">example</a>
콘텐츠가있는 mailto :
<a href="mailto:no-one@snai1mai1.com?subject=look at this website&body=Hi,I found this website and thought you might like it http://www.geocities.com/wowhtml/">tell a friend</a>
주석에서 언급했듯이 subject
와 body
모두 적절하게 탈출해야합니다. 특정 경우에 대해 직접 코딩하지 않고 각각에 encodeURIComponent(subject)
를 사용하십시오.
Hoody 가 주석에서 언급했듯이 문자열에 다음 인코딩 시퀀스를 추가하여 줄 바꿈을 추가 할 수 있습니다.
%0D%0A // one line break
출처 : https://stackoverflow.com/questions/4782068/can-i-set-subject-content-of-email-using-mailto
728x90
반응형