메일내용이 전달 안되는 상황
※ 필수입력정보 ※
▷ 제품버젼 : Nmail3.8
▷ 오류발생 메뉴/주소 :
▷ 에러메세지 : 550.5.1.1
▷ 질문내용 :
환경은 윈도우 2003 서버 환경입니다.
outlook 에서는 별 문제 없이 자체적으로 잘 돌아갑니다.
특정사이트에서 콤포넌트를 이용한 메일 전송시 위와 같은 메세지가
뜨면서 배달이 안되는 상황입니다.
포털사이트에 보내면 위에 에러메세지가 뜨고요.
같은 서버에 메일을 발송하면
내용과 수신,송신 이름이 비어 있는 메일이 수신됩니다.
원래 잘 사용하다가 어느날 갑자기 이런 현상이 발생했는데요.
아래의 소스를 사용하고 있는데
Respons.write 찍어 보면 정상적으로 표시 되는데
어떤점이 문제인가요?
<!--#include virtual="DB_Constr/DB_Open.asp"-->
<%
Response.Write "1"
Function convertChar(strValue)
strValue = replace(strValue, "'", "''")
convertChar = strValue
End Function
SET UploadForm = Server.CreateObject("DEXT.FileUpload")
UploadForm.DefaultPath = Server.Mappath("/UpLoad/InsertFile")
Response.Write "2"
ManagerId = Trim(Request.Cookies("WstrMemberID"))
sPathR = Trim(UploadForm("sPath"))
ftype = Trim(UploadForm("ftype"))
sMode = Trim(UploadForm("sMode"))
sURL = Trim(UploadForm("sURL"))
strMemberID = Trim(UploadForm("strMemberID"))
memKind = Trim(UploadForm("memKind"))
mCode = Trim(UploadForm("mCode"))
IDX = Trim(UploadForm("IDX"))
page = Trim(UploadForm("page"))
strGubun = Trim(UploadForm("strGubun"))
strKeyword = Trim(UploadForm("strKeyword"))
Response.Write "3"
MailCode = Trim(convertChar(UploadForm("MailCode")))
SendMan = Trim(convertChar(UploadForm("SendMan")))
SendEmail = Trim(convertChar(UploadForm("SendEmail")))
ReceiveName = Trim(convertChar(UploadForm("ReceiveName")))
ReceiveEmail = Trim(convertChar(UploadForm("ReceiveEmail")))
strTitle = Trim(convertChar(UploadForm("strTitle")))
strContent = Trim(convertChar(UploadForm("strContent")))
strEdomain = Trim(convertChar(UploadForm("strEdomain")))
Response.Write "4"
ManagerName = Trim(SendMan)
ManagerEmail = Trim(SendEmail)
If uploadform("file1") <> "" Then
Filename = UploadForm.DefaultPath & "\" & UploadForm("file1").FileName
FilenameOrigin = UpLoadForm("file1").SaveAs(Filename, False)
FilenameResult = Right(FilenameOrigin, Len(FilenameOrigin) - InStrRev(FilenameOrigin, "\"))
FilenameResult = LCase(FilenameResult)
end if
Response.Write "5"
Sql = "Select Max(IDX) From MailSend_List"
SET objCnt = objCon.Execute(Sql)
if isnull(objCnt(0)) Then
mailIDX = 1
else
mailIDX = objCnt(0)+1
end if
objCnt.CLOSE
SET objCnt = NOTHING
Response.Write "6"
'''''''''''''''' 히스토리 목록에 남긴다 '''''''''''''
strSQL = " Insert Into MailSend_List(IDX,strMemberID,ManagerId,ReceiveName,ReceiveEmail,strTtile,strContent,RegDate,openFlag,mailCode) "
strSQL = strSQL & " values("&mailIDX&",'"&strMemberID&"','"&Trim(ManagerId)&"','"&ReceiveName&"','"&ReceiveEmail&"','"&strTitle&"',"
strSQL = strSQL & " '"&strContent&"',getdate(),'X','"&mailCode&"');"
if Len(strMemberID) > 0 Then
strSQL = strSQL & "Insert Into ContactSchedule (strMemberID,contactType,memText,replyType,ctText,scheduleDay,ctID,ctName,RegistDay) values "
strSQL = strSQL & "('"&strMemberID&"','','','이메일발송','<a href=# onclick=sendMailList("&mailIDX&")>메일내용보기</a>','1990-01-01','"&ManagerID&"','"&SendMan&"',getdate());"
end if
'''''''''''''''' 히스토리 목록에 남긴다 '''''''''''''
'Response.write MailCode
'response.end
With objCon
On Error Resume Next
.BeginTrans
.Execute(strSQL)
Response.Write "7"
ErrorCheck = .Errors.Count
If Trim(ErrorCheck) = 0 Then
.CommitTrans
DBError = 1
Else
.RollbackTrans
DBError = 2
End if
END With
objCon.CLOSE
Response.Write "8"
IF Trim(DBError) = 1 THEN
SET objMail = Server.CreateObject("Ncdo.Ncdonts.1")
objMail.Smtpserver = "아이피기입" '보낸는 메일서버 지정 (아이피 지정도 가능)
mailHeader = "<SPAN id=myLetter style='DISPLAY: none'><img src=http://www.guwed.com/WedGu_Admin/M_Member/MailOpen_Check.asp?Idx="&mailIDX&" width=0 height=0></span>"
objMail.From = SendEmail
'Response.Write "SendEmail="&SendEmail
objMail.To = ReceiveEmail
'Response.Write "ReceiveEmail="&ReceiveEmail
objMail.Subject = strTitle '제목을 설정한다.
'Response.Write "strTitle="&strTitle
objMail.Queue = True
IF Len(mailCode) > 0 Then
Response.Write "9"
mFileName = Server.MapPath("/")&"\Mail\"&mailCode&".htm" '메일폼
Set objFSO = server.CreateObject("Scripting.FileSystemObject")
IF objFSO.FileExists(mFileName) THEN
SET objNewFile = objFSO.OpenTextFile(mFileName, 1, True)
mailContent = objNewFile.ReadAll()
objNewFile.CLOSE
SET bjNewFilel = NOTHING
END IF
SET objFSO = NOTHING
mailContent = mailHeader & mailContent
mailContent = replace(mailContent, "[strContent]", strContent)
ELSE
mailContent = mailHeader & strContent
MailContent = "<table width=100% cellpadding=0 cellspacing=0><tr><td>"&MailContent&"</td></tr></table>"
'Response.Write mailcode
'Response.end
END IF
'Response.Write "mailContent="&mailContent
objMail.Body = mailContent
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.importance = 1
Response.Write "10"
If FilenameResult <> "" Then
objMail.AttachFile FilenameOrigin,FilenameResult,1
end if
'Response.Write mailcontent
'Response.end
if objMail.Send = 1 then '메일을 보낸다.
Response.Write "메일발송에 성공했습니다."
else
Response.Write " 에러메세지 : " & objMail.Errormsg & "<br>메일을 발송하지 못했습니다."
'Response.End
end if
'Response.Write mailcontent
'Response.end
If FilenameResult <> "" Then
If UploadForm.FileExists(UploadForm.DefaultPath & "\" & FilenameResult) Then
UploadForm.DeleteFile(UploadForm.DefaultPath & "\" & FilenameResult)
End If
End If
SET objMail = NOTHING
SET UploadForm = NOTHING
'Response.Write sURL
'response.end
Response.Cookies("wMem")("strMailFlag") = ""
Response.Write "11"
%>
<Script language=JavaScript>
<%
IF Trim(sURL) = "Member_View" THEN
%>
'location.href="Member_View.asp?IDX=<%=IDX%>&mCode=<%=mCode%>&memKind=<%=memKind%>&strMemberID=<%=strMemberID%>&sPath=<%=sPathR%>"
<%
ELSE
%>
'location.href="<%=sURL%>.asp?IDX=<%=IDX%>&mCode=<%=mCode%>&memKind=<%=memKind%>&strMemberID=<%=strMemberID%>&Page=<%=Page%>&strGubun=<%=strGubun%>&strKeyword=<%=strKeyword%>&sPath=<%=sPathR%>"
<%
END IF
%>
</Script>
<%
ELSE
Response.Write "12"
SET objMail = NOTHING
SET UploadForm = NOTHING
Response.write "Error가 발생했습니다."
Response.end
END IF
%>
이전 글 | SMTP 허용안함에 허용함으로 바꾼후 Relay가 되지 않음 2 | 이*준 | 2012.06.12 |
---|---|---|---|
다음 글 | 스팸처리 된건지요?? 1 | E*****t | 2012.06.08 |