Q&A

  • nmsmtp로 asp에서 메일보내기 컴포넌트 만들기
아래의 메소드를 이용하여 메일을 보내려고 하는데 소켓오류가 납니다.도와주세요.

=========================================================================

procedure TSmtp.SendMail(const from, to_, subject, body, id, passwd,

host: WideString);

var

sendmsg:TNMsmtp;

begin



TNMsmtp.Create(sendmsg);

sendmsg.Host := string(host);

sendmsg.UserID := string(id);

sendmsg.Port := 25;

sendmsg.Connect;

sendmsg.PostMessage.FromAddress := string(from);

sendmsg.PostMessage.ToAddress.Text := string(to_);

sendmsg.PostMessage.Body.Text := string(body);

sendmsg.PostMessage.Subject := string(subject);

sendmsg.SendMail;

sendmsg.Disconnect;

sendmsg.Free;



end;

===================================================================

오류메세지 내용입니다.

==================================================================

You should see the results of your Delphi Active Server method below



--------------------------------------------------------------------------------



smtpcom2.Smtp error '8000ffff'



10038:Socket operation on non-socket



/Smtp.asp, line 9

===================================================================

1  COMMENTS
  • Profile
    화랑 2000.09.24 17:07
    이창식 wrote:

    > 아래의 메소드를 이용하여 메일을 보내려고 하는데 소켓오류가 납니다.도와주세요.

    > =========================================================================

    > procedure TSmtp.SendMail(const from, to_, subject, body, id, passwd,

    > host: WideString);

    > var

    > sendmsg:TNMsmtp;

    > begin

    >

    > TNMsmtp.Create(sendmsg);

    > sendmsg.Host := string(host);

    > sendmsg.UserID := string(id);

    > sendmsg.Port := 25;

    > sendmsg.Connect;

    > sendmsg.PostMessage.FromAddress := string(from);

    > sendmsg.PostMessage.ToAddress.Text := string(to_);

    > sendmsg.PostMessage.Body.Text := string(body);

    > sendmsg.PostMessage.Subject := string(subject);

    > sendmsg.SendMail;

    > sendmsg.Disconnect;

    > sendmsg.Free;

    >

    > end;

    > ===================================================================

    > 오류메세지 내용입니다.

    > ==================================================================

    > You should see the results of your Delphi Active Server method below

    >

    > --------------------------------------------------------------------------------

    >

    > smtpcom2.Smtp error '8000ffff'

    >

    > 10038:Socket operation on non-socket

    >

    > /Smtp.asp, line 9

    > ===================================================================



    클래스가 Create 하는 부분에서 잘못 된것 같아요...



    Sendmsg := TNMsmtp.Create(nil);

    중간생략

    sendmsg.Free;



    으로 해보세요....



    즐거운 일요일 아침입니다~



    겜방에서~