ASP Free Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherASP Free Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 7th, 2004, 10:25 AM
Anteneh Tadesse Anteneh Tadesse is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 Anteneh Tadesse User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 20 sec
Reputation Power: 0
Exclamation sending messages to multiple users from my access db table

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>


Reply With Quote
  #2  
Old October 7th, 2004, 10:11 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 21 h 32 m 23 sec
Reputation Power: 180
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:
ASP development forum to discuss anything that doesn't fit into the other forums. This is a place to relax, talk, and even have some friendly debate.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherASP Free Lounge > sending messages to multiple users from my access db table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway