C# Class nMail.Smtp

SMTP ���[�����M�N���X
Inheritance: IDisposable
Mostra file Open project: hijirichan/AkaneMail Class Usage Examples

Protected Properties

Property Type Description
_bcc string
_body string
_cc string
_cert_name string
_connect_flag bool
_err int
_filename string
_filename_list string[]
_flag int
_from string
_header string
_host string
_id string
_mode int
_password string
_port int
_socket IntPtr
_ssl int
_subject string
_temp byte[]
_to string

Public Methods

Method Description
Authenticate ( ) : void

SMTP AUTH �F��

�ꎞ�x�~�@�\��g���ꍇ��Connect�̌�ɌĂяo���܂��B

Authenticate ( string id_str, string pass_str, int mode ) : void

SMTP AUTH �F��

Close ( ) : void

SMTP �T�[�o�Ƃ̐ڑ��I��

Connect ( ) : void

SMTP �T�[�o�ɐڑ����܂��B

SMTP AUTH ����шꎞ�x�~�@�\��g���ꍇ�Ɏg�p���܂��B

Connect ( int port_no ) : void

SMTP �T�[�o�ɐڑ�

SMTP AUTH ����шꎞ�x�~�@�\��g���ꍇ�Ɏg�p���܂��B

Connect ( string host_name ) : void

SMTP �T�[�o�ɐڑ�

SMTP AUTH ����шꎞ�x�~�@�\��g���ꍇ�Ɏg�p���܂��B

Connect ( string host_name, int port_no ) : void

SMTP �T�[�o�ɐڑ�

SMTP AUTH ����шꎞ�x�~�@�\��g���ꍇ�Ɏg�p���܂��B

Dispose ( ) : void

Smtp�ɂ���Ďg�p����Ă��邷�ׂẴ��\�[�X�������܂��B

SendMail ( ) : void

���[���𑗐M���܂��B

�ꎞ�x�~�@�\�̓��ڈȍ~�̌Ăяo���Ŏg�p���܂��B

SendMail ( string to_str, string from_str, string subject_str, string body_str ) : void

���[���𑗐M���܂��B

to_str�p�����[�^�Ń��[���̈����w�肵�܂��B from_str�p�����[�^�ō��o�l��w�肵�܂��B subject_str�p�����[�^�Ō�����w�肵�܂��B body_str�p�����[�^�Ŗ{����w�肵�܂��B

CC ��w�肵�����ꍇ�ACc�Ɏw�肵�Ă����܂��B

BCC ��w�肵�����ꍇ�ABcc�Ɏw�肵�Ă����܂��B

�t�@�C����Y�t�������ꍇ�AFileName�Ɏw�肵�Ă����܂��B

Smtp ( ) : System

Smtp�N���X�̐V�K�C���X�^���X����������܂��B

Smtp ( string host_name ) : System

Smtp�N���X�̐V�K�C���X�^���X����������܂��B

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Smtp�ɂ���Ďg�p����Ă��邷�ׂẴ��\�[�X�������܂��B

Init ( ) : void

�����������ł��B

Private Methods

Method Description
SmtpAuthenticate ( IntPtr Socket, string HostName, string Id, string Pass, int Mode ) : int
SmtpClose ( IntPtr Socket ) : int
SmtpConnect ( string Host ) : IntPtr
SmtpConnectPortNo ( string Host, int PortNo ) : IntPtr
SmtpConnectSsl ( string Host, int Port, int Flag, string Name ) : IntPtr
SmtpSendMailEx ( IntPtr Socket, string To, string Cc, string Bcc, string From, string Subject, String Body, String Header, String Path, byte Temp, int Flag ) : int
SmtpSendMailPortNo ( String HostName, String To, String Cc, String Bcc, String From, String Subject, String Body, String Header, String Path, int Flag, int PortNo ) : int
SmtpSendMailSsl ( String HostName, String To, String Cc, String Bcc, String From, String Subject, String Body, String Header, String Path, int Flag, int PortNo, int SslFlag, String Name ) : int

Method Details

Authenticate() public method

SMTP AUTH �F��
�ꎞ�x�~�@�\��g���ꍇ��Connect�̌�ɌĂяo���܂��B
/// �ڑ���Ԃł͂���܂���B���������Ă��Ȃ����A�Ăяo���Ă��܂���B���̃��\�b�h��Ăяo���ꍇ��(��Ăяo���K�v������܂��B�B /// /// �T�[�o�Ƃ̌�M���ɃG���[���������܂����B /// �ɃG���[���b�Z�[�W�A /// �ɃG���[�R�[�h������܂��B ///
public Authenticate ( ) : void
return void

Authenticate() public method

SMTP AUTH �F��
/// �ڑ���Ԃł͂���܂���B���������Ă��Ȃ����A�Ăяo���Ă��܂���B���̃��\�b�h��Ăяo���ꍇ��(��Ăяo���K�v������܂��B�B /// /// �T�[�o�Ƃ̌�M���ɃG���[���������܂����B /// �ɃG���[���b�Z�[�W�A /// �ɃG���[�R�[�h������܂��B ///
public Authenticate ( string id_str, string pass_str, int mode ) : void
id_str string ���[�U�[ ID
pass_str string �p�X���[�h
mode int �F�،`��
return void

Close() public method

SMTP �T�[�o�Ƃ̐ڑ��I��
public Close ( ) : void
return void

Connect() public method

SMTP �T�[�o�ɐڑ����܂��B
SMTP AUTH ����шꎞ�x�~�@�\��g���ꍇ�Ɏg�p���܂��B
/// �T�[�o���ɕ����񂪓����Ă��܂���B /// /// �|�[�g�ԍ�������������܂���B /// /// �T�[�o�Ƃ̌�M���ɃG���[���������܂����B /// �ɃG���[���b�Z�[�W�A /// �ɃG���[�R�[�h������܂��B ///
public Connect ( ) : void
return void

Connect() public method

SMTP �T�[�o�ɐڑ�
SMTP AUTH ����шꎞ�x�~�@�\��g���ꍇ�Ɏg�p���܂��B
/// �T�[�o���ɕ����񂪓����Ă��܂���B /// /// �|�[�g�ԍ�������������܂���B /// /// �T�[�o�Ƃ̌�M���ɃG���[���������܂����B /// �ɃG���[���b�Z�[�W�A /// �ɃG���[�R�[�h������܂��B ///
public Connect ( int port_no ) : void
port_no int �|�[�g�ԍ�
return void

Connect() public method

SMTP �T�[�o�ɐڑ�
SMTP AUTH ����шꎞ�x�~�@�\��g���ꍇ�Ɏg�p���܂��B
/// �T�[�o���ɕ����񂪓����Ă��܂���B /// /// �|�[�g�ԍ�������������܂���B /// /// �T�[�o�Ƃ̌�M���ɃG���[���������܂����B /// �ɃG���[���b�Z�[�W�A /// �ɃG���[�R�[�h������܂��B ///
public Connect ( string host_name ) : void
host_name string SMTP �T�[�o��
return void

Connect() public method

SMTP �T�[�o�ɐڑ�
SMTP AUTH ����шꎞ�x�~�@�\��g���ꍇ�Ɏg�p���܂��B
/// �T�[�o���ɕ����񂪓����Ă��܂���B /// /// �|�[�g�ԍ�������������܂���B /// /// �T�[�o�Ƃ̌�M���ɃG���[���������܂����B /// �ɃG���[���b�Z�[�W�A /// �ɃG���[�R�[�h������܂��B ///
public Connect ( string host_name, int port_no ) : void
host_name string SMTP �T�[�o��
port_no int �|�[�g�ԍ�
return void

Dispose() public method

Smtp�ɂ���Ďg�p����Ă��邷�ׂẴ��\�[�X�������܂��B
public Dispose ( ) : void
return void

Dispose() protected method

Smtp�ɂ���Ďg�p����Ă��邷�ׂẴ��\�[�X�������܂��B
protected Dispose ( bool disposing ) : void
disposing bool /// �}�l�[�W���\�[�X�ƃA���}�l�[�W���\�[�X�̗�����������ꍇ��true�B /// �A���}�l�[�W���\�[�X������������ꍇ��false�B ///
return void

Init() protected method

�����������ł��B
protected Init ( ) : void
return void

SendMail() public method

���[���𑗐M���܂��B
�ꎞ�x�~�@�\�̓��ڈȍ~�̌Ăяo���Ŏg�p���܂��B
/// �Őݒ肳��Ă���t�@�C�������݂��܂���B /// /// �T�[�o�Ƃ̌�M���ɃG���[���������܂����B /// �ɃG���[���b�Z�[�W�A /// �ɃG���[�R�[�h������܂��B ///
public SendMail ( ) : void
return void

SendMail() public method

���[���𑗐M���܂��B
to_str�p�����[�^�Ń��[���̈����w�肵�܂��B from_str�p�����[�^�ō��o�l��w�肵�܂��B subject_str�p�����[�^�Ō�����w�肵�܂��B body_str�p�����[�^�Ŗ{����w�肵�܂��B

CC ��w�肵�����ꍇ�ACc�Ɏw�肵�Ă����܂��B

BCC ��w�肵�����ꍇ�ABcc�Ɏw�肵�Ă����܂��B

�t�@�C����Y�t�������ꍇ�AFileName�Ɏw�肵�Ă����܂��B

/// �Őݒ肳��Ă���t�@�C�������݂��܂���B /// /// �T�[�o�Ƃ̌�M���ɃG���[���������܂����B /// �ɃG���[���b�Z�[�W�A /// �ɃG���[�R�[�h������܂��B ///
public SendMail ( string to_str, string from_str, string subject_str, string body_str ) : void
to_str string ����
from_str string ���o�l
subject_str string ����
body_str string �{��
return void

Smtp() public method

Smtp�N���X�̐V�K�C���X�^���X����������܂��B
public Smtp ( ) : System
return System

Smtp() public method

Smtp�N���X�̐V�K�C���X�^���X����������܂��B
public Smtp ( string host_name ) : System
host_name string SMTP �T�[�o��
return System

Property Details

_bcc protected_oe property

���[���� BCC �ł��B
protected string _bcc
return string

_body protected_oe property

���[���̖{���ł��B
protected string _body
return string

_cc protected_oe property

���[���� CC �ł��B
protected string _cc
return string

_cert_name protected_oe property

SSL �N���C�A���g�ؖ������ł��B
protected string _cert_name
return string

_connect_flag protected_oe property

Connect() ��g�������ǂ����̃t���O�ł��B
protected bool _connect_flag
return bool

_err protected_oe property

�G���[�ԍ��ł��B
protected int _err
return int

_filename protected_oe property

���[���ɓY�t����t�@�C�����ł��B
protected string _filename
return string

_filename_list protected_oe property

�Y�t�t�@�C�����̃��X�g�ł��B
protected string[] _filename_list
return string[]

_flag protected_oe property

���[�����M�g���@�\�̎w��ł��B
protected int _flag
return int

_from protected_oe property

���[���̍��o�l�ł��B
protected string _from
return string

_header protected_oe property

���[���̒lj��w�b�_�ł��B
protected string _header
return string

_host protected_oe property

SMTP �T�[�o���ł��B
protected string _host
return string

_id protected_oe property

SMTP AUTH ���[�U�[���ł��B
protected string _id
return string

_mode protected_oe property

SMTP AUTH �̔F�ؕ��@�ł��B
protected int _mode
return int

_password protected_oe property

SMTP AUTH �p�X���[�h�ł��B
protected string _password
return string

_port protected_oe property

SMTP �|�[�g�ԍ��ł��B
protected int _port
return int

_socket protected_oe property

�\�P�b�g�n���h���ł��B
protected IntPtr _socket
return IntPtr

_ssl protected_oe property

SSL �ݒ�t���O�ł��B
protected int _ssl
return int

_subject protected_oe property

���[���̌����ł��B
protected string _subject
return string

_temp protected_oe property

�g���@�\�p�o�b�t�@�ł��B
protected byte[] _temp
return byte[]

_to protected_oe property

���[���̈���ł��B
protected string _to
return string