다음을 통해 공유


<smtp> 요소(네트워크 설정)

전자 메일을 보내기 위한 배달 형식, 배달 방법 및 주소에서 구성합니다.

<구성>
   <system.net>
     <mailSettings>
       <smtp>

문법

<smtp
  deliveryFormat="format"
  deliveryMethod="method"
  from="from address">
    <specifiedPickupDirectory>...</specifiedPickupDirectory>
    <network>...</network>
</smtp>

특성 및 요소

다음의 섹션은 특성, 자식 요소 및 부모 요소에 대해 설명합니다.

Attributes

특성 Description
deliveryFormat 보내는 전자 메일의 배달 형식을 지정합니다. 허용되는 값은 SevenBit 및 International입니다.
deliveryMethod 전자 메일의 배달 방법을 지정합니다. 허용되는 값은 Network, PickupDirectoryFromIis 및 SpecifiedPickupDirectory입니다.
from 보내는 전자 메일의 보낸 사람 주소를 지정합니다.

자식 요소

특성 Description
specifiedPickupDirectory SMTP(Simple Mail Transport Protocol) 서버에 대한 로컬 디렉터리를 구성합니다.
network 외부 SMTP 서버에 대한 네트워크 옵션을 구성합니다.

부모 요소

요소 설명
<mailSettings> 요소(네트워크 설정) 메일 보내기 옵션을 구성합니다.

예시

다음 예제에서는 기본 네트워크 자격 증명을 사용하여 이메일을 보낼 적절한 SMTP 매개 변수를 지정합니다.

<configuration>
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="Network" deliveryFormat="SevenBit"  from="ben@contoso.com">
        <network
          host="localhost"
          port="25"
          defaultCredentials="true"
        />
      </smtp>
    </mailSettings>
  </system.net>
</configuration>

참고하십시오