mailto이메일 주소를 위한 통합 자원 식별자(URI) 스킴이다. 이메일 클라이언트로의 복사 및 입력 과정 없이 사용자들이 특정한 주소로 전자 우편을 보낼 수 있도록 웹사이트하이퍼링크를 만들기 위해 사용된다. RFC 2368에 처음 정의되어 1998년 7월에 출판되었고,[1] RFC 6068에 사소한 개선이 추가되어 2010년 10월 출판되었다.[2]

편집

HTML 문서에 "mailto"을 사용하면 이메일을 보내기 위한 링크를 생성한다:

<a href="mailto:someone@example.com">Send email</a>

헤더의 초기값(예: 제목, 참조 등)과 메시지 본문을 URL에 지정할 수도 있다. 빈 값, 캐리지 리턴, 라인피드는 넣을 수 없으므로 퍼센트 인코딩처리되어야 한다.

<a href="mailto:someone@example.com?subject=This%20is%20the%20subject&cc=someone_else@example.com&body=This%20is%20the%20body">Send email</a>

여러 개의 주소를 지정할 수도 있다:[2]

<a href="mailto:someone@example.com,someoneelse@example.com">Send email</a>

주소를 생략할 수도 있다:

<a href="mailto:?to=&subject=mailto%20with%20examples&body=https://en.wikipedia.org/wiki/Mailto">Share this knowledge...</a>

각주 편집

  1. Hoffman, Paul; Masinter, Larry; Zawinski, Jamie (July 1998). “The mailto URL scheme”. 2015년 9월 26일에 확인함. 
  2. Duerst, Martin; Masinter, Larry; Zawinski, Jamie (October 2010). “The 'mailto' URI Scheme”. 2015년 9월 26일에 확인함.