HOME > ASP > ASP Forum > ส่ง mailing list error แก้ไขยังไงครับ Error Type: CDO.Message.1 (0x8004020D) At least one of the From or Sender fields is required, and neither was found. /
ส่ง mailing list error แก้ไขยังไงครับ Error Type: CDO.Message.1 (0x8004020D) At least one of the From or Sender fields is required, and neither was found. /
ผมเขียนโค้ดให้ส่งอีเมลจากที่อยู่ในฐานข้อมูล
แต่มันมี error ที่ไม่รู้ รบกวนด้วยครับ
Error Type:
CDO.Message.1 (0x8004020D)
At least one of the From or Sender fields is required, and neither was found.
/d/alumnus/act_sendmail.asp, line 62
<!--#include file="include/connect.asp" -->
<%
strEmailBody=Request.Form("message")
strSubjectMail=Request.Form("subject")
strSendGroup=Request.Form("branch_spu_id")
Select Case strSendGroup
Case"0"
strSQL="Select*From member"
Case"1"
strSQL="Select*From member Where branch_spu_id =1"
Case"2"
strSQL="Select*From member Where branch_spu_id =2"
Case"3"
strSQL="Select*From member Where branch_spu_id =3"
Case"4"
strSQL="Select*From member Where branch_spu_id =4"
Case"5"
strSQL="Select*From member Where branch_spu_id =5"
Case"6"
strSQL="Select*From member Where branch_spu_id =6"
Case"7"
strSQL="Select*From member Where branch_spu_id =7"
Case"8"
strSQL="Select*From member Where branch_spu_id =8"
End Select
Set strRSGroup =Server.CreateObject("ADODB.Recordset")
strRSGroup.open strSQL,Conn,1,3
Do While NOT strRSGroup.EOF
strUser=strRSGroup("name")
strEmail=strRSGroup("mail")
%>
<%
Dim objCDOSYSCon
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
With objCDOSYSCon
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMail_server
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Fields.Update
End With