|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dear Freinds;
Would you please help me to execute sending email to multiple users from my db table? Here is the error message I am geeting: Error Type: CDO.Message.1 (0x80040220) The "SendUsing" configuration value is invalid. /Email/SendMail.asp, line 29 Here is the source code I am using: <!METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library"> <!METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <%@ Language=VBScript %> <% Dim con Dim rs Dim str set con = Server.CreateObject("ADODB.Connection") str = "Data source = Mailbase" con.open str set rs = Server.CreateObject("ADODB.Recordset") Dim NewMailOb Dim sMailBody Dim sSQL Dim objConfig Dim Flds For i = 1 to Request.Form("SendEmail").Count sSQL = "Select Firstname from Students Where email ='"& Request.Form("SendEmail")(i) &"'" rs.open sSQL, con set NewMailOb = Server.CreateObject("CDO.Message") Set objConfig = Server.CreateObject("CDO.Configuration") Set Flds = objConfig.Fields With Flds .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "mail-fwd" .Item(cdoSMTPServerPort) = 25 .Item(cdoSMTPconnectiontimeout) = 10 .Update End With Set NewMailOb.Configuration = objConfig NewMailOb.From = "agirma.howard.edu" NewMailOb.To = Request.Form("SendEMail")(i) NewMailOb.Subject = Request.Form("subject") 'NewMailOb.BodyFormat = MailFormat.Text sMailBody = "Dear " & rs.Fields("Firstname") & "," & " <br>"'vbNewLine & vbNewLine sMailBody = sMailBody & Request.Form("MessageText") & "<br>" NewMailOb.HTMLBody = sMailBody NewMailOb.Send Set NewMailOb = Nothing Set objConfig = Nothing Set Flds = Nothing rs.Close() next con.close() Set rs = Nothing set con = Nothing %> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body Link="#ff4040" vtext="Lightred" bgcolor="#CCCCCC"> <center> <table Width="640" border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"> <hr width="640"> </td> </tr> </table> <H2>SENDING MAIL TO STUDENTS</H2> </center> <H3>Step 3:</H3> <H4>Message has been sent!</H4> </body> </html> |
|
#2
|
|||
|
|||
|
My guess is you need to fix the "sendusing" configuration.
![]() BTW if you didn't read the description of this forum, here it is: Quote:
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Other > ASP Free Lounge > sending messages to multiple users from my access db table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|