MTA
[ class tree: MTA ] [ index: MTA ] [ all elements ]

Class: MTA_Socket

Source Location: /MTA/MTA/MTA_Socket.php

Class Overview


Socket for send mail of MTA API


Variables

Methods


Child classes:

MTA_Generate
메일 발송 내용을 구성하기 위한 추상 레이어

Class Details

[line 27]
Socket for send mail of MTA API

소켓으로 메일을 발송하기 위한 추상 레이어




[ Top ]


Class Variables

$error =  null

[line 34]

에러 메시지



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method close [line 425]

void close( )

Quit 명령을 실행한 후, socket을 닫는다.



Tags:

access:  protected


[ Top ]

method data [line 319]

bool data( &$v, string $v)

DATA 명령 전송 및 mail body 전송



Tags:

access:  protected


Parameters:

string   $v   메일 본문 원본
   &$v  

[ Top ]

method debug [line 441]

void debug( string $m)

verbose properity가 true로 설정이 되면 debug 메시지를 출력한다.



Tags:

access:  protected


Parameters:

string   $m   메시지

[ Top ]

method ehlo [line 218]

bool ehlo( )

ehlo 명령 전송



Tags:

access:  protected


[ Top ]

method mailfrom [line 245]

bool mailfrom( stdClass $o)

mailfrom 명령 전송



Tags:

access:  protected


Parameters:

stdClass   $o   mail object
  • o->from : Sender address
  • o->to : array of Reciever address
  • o->cc : array of See also reciever address
  • o->bcc : array of Hidden see also reciever address
  • o->subjet : mail subject
  • o->body : mail contents
  • o->pbody : planin/text mail contents (optional)
  • o->attach : attached files (array / optional)

[ Top ]

method open [line 350]

bool open( stdClass $o)



Tags:

access:  protected


Parameters:

stdClass   $o   MTA_Socket::target_object method 반환값

[ Top ]

method rcptto [line 280]

bool rcptto( stdClass $o, array &$log)

RCPT 명령 전송



Tags:

access:  protected


Parameters:

stdClass   $o   MTA_Socket::target_object method의 rcpt list
array   &$log   발송 로그

[ Top ]

method read [line 386]

string read( )

소켓을 읽는다.



Tags:

access:  protected


[ Top ]

method socket_send [line 145]

stdClass socket_send( stdClass $o, string &$template)

메일 발송



Tags:

return:  

발송 결과를 object로 반환한다.

   stdClass Object
   (
       [status]  => (boolean) 성공 실패 여부
       [error]   => (string|null) status false시 에러 메시지
       [rcptlog] => (array) rcpt to에 대한 log
   )

RCPT list별로 확인을 위해서 status가 true이더라도 rcptlog를 확인하는 것이 필요

access:  protected


Parameters:

stdClass   $o   mail object
   stdClass Object
   (
       [rpath]  => (string) return path (optional)
       [from]   => (string) Sender address
       [to]     => (array) Reciever address
       [cc]     => (array) See also reciever address
       [bcc]    => (array) Hidden see also reciever address
       [subjet] => (string) mail subject
       [body]   => (string) mail contents
       [pbody]  => (string) planin/text mail contents (optional)
       [attach] => (array) attached files (optional)
   )
string   &$template   메일 본문

[ Top ]

method target_object [line 54]

stdClass target_object( stdClass $o)

동일한 호스트에 여러번 접속하지 않도록 하기 위하여 메일 호스트 별로 모음



Tags:

access:  protected


Parameters:

stdClass   $o   mail object
   stdClass Object
   (
       [to]  => (array) to list
       [cc]  => (array) cc list
       [bcc] => (array) bcc list
   )

[ Top ]

method write [line 411]

int write( string $m)

데이터의 끝에 "\r\n"을 붙여서 전송한다.



Tags:

return:  전송한 데이터 길이
access:  protected


Parameters:

string   $m   전송할 데이터

[ Top ]


Documentation generated on Tue, 14 May 2019 02:00:35 +0900 by phpDocumentor 1.4.4