public GetHeaderField ( string field_name ) : string | ||
field_name | string | �t�B�[���h�� |
Результат | string |
�w�b�_�́AHeader�Őݒ肵�Ă����܂��B GetMail�Ŏ�M��������ɌĂяo�����ꍇ�A ��M�������[���̃w�b�_��g�p���܂��B
�擾�����t�B�[���h��e��Field�Ŏ擾�ł��܂��B
�w��̃��[���ԍ�(�ϐ�:no)�� X-Mailer �w�b�_�t�B�[���h��擾����B using(nMail.Pop3 pop = new nMail.Pop3("mail.example.com")) { try { pop.Connect(); pop.Authenticate("pop3_id", "password"); pop.GetMail(no); MessageBox.Show("X-Mailer:" + pop.GetHeaderField("X-Mailer:")); } catch(nMail.nMailException nex) { MessageBox.Show(String.Format("�G���[ �ԍ�:{0:d} ���b�Z�[�W:{1:s}", nex.ErrorCode, nex.Message)); } catch(Exception e) { MessageBox.Show(String.Format("�G���[ ���b�Z�[�W:{0:s}", ex.Message)); } }
' VB.NET 2005 �ȍ~�̏ꍇ�AC# �Ɠ��l�� using ���g�p�ł��܂��B Dim pop As nMail.Pop3 = New nMail.Pop3("mail.example.com") Try pop.Connect() pop.Authenticate("pop3_id", "password") pop.GetMail(no) MessageBox.Show("X-Mailer:" + pop.GetHeaderField("X-Mailer:")) Catch nex As nMail.nMailException MessageBox.Show(String.Format("�G���[ �ԍ�:{0:d} ���b�Z�[�W:{1:s}", nex.ErrorCode, nex.Message)) Catch ex As Exception MessageBox.Show(String.Format("�G���[ ���b�Z�[�W:{0:s}", ex.Message)) Finally pop.Dispose() End Try
public GetHeaderField ( string field_name ) : string | ||
field_name | string | �t�B�[���h�� |
Результат | string |