Advertisement

02.24.2007 at 06:07PM PST, ID: 22411571
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

Send email from DB using CDOSYS

Asked by ksilvoso in Active Server Pages (ASP), Microsoft Access Database, Microsoft IIS Web Server

Tags:

I have a form to send email to members using CDOSYS. I had it working fine with CDONTS but my new webhost requires that I use CDOSYS. The code below actually sends emails to the members but I get an error. Here is the code that I am using:

<%
server.ScriptTimeout=1800
if len(request.form) > 0 then

Dim objMail, rs
Dim MyBody

MyBody=replace(trim(request.form("matter")), vbCrLf, "<br />")
fnpath=Server.Mappath("db/mydatabase.mdb")
set aqe=server.CreateObject("ADODB.Connection")
aqe.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & fnpath
set rs=server.CreateObject("ADODB.Recordset")

Set objMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")

'Configuration:
objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort

objConfig.Fields(cdoSMTPServer)="smtp.mywebhost.com"
objConfig.Fields(cdoSMTPServerPort)=25
objConfig.Fields(cdoSMTPAuthenticate)=cdoBasic
objConfig.Fields(cdoSendUserName)="sendusername@ptraa.com"
objConfig.Fields(cdoSendPassword)="secrectpassword"

'Update configuration
objConfig.Fields.Update
Set objMail.Configuration = objConfig

rs.open "select MemberEmail from testmail where MemberEmail <> '""'",aqe,3,3
rs.MoveFirst
while not rs.eof
      objMail.From = "myname@mywebsite.com"
      objMail.To = trim(rs("MemberEmail"))
      objMail.Subject = trim(request.form("subject"))
      objMail.HTMLBody = trim(request.form("matter"))
      objMail.Send

      Set objMail=Nothing
      Set objConfig=Nothing

      wend
      mailsent="true"
end if
%>

Here is the error message I get:

Object required
/massmail.asp, line 42

Another minor issue is that the email message is not saving line breaks. Everything goes on one lineStart Free Trial
 
Loading Advertisement...
 
[+][-]02.24.2007 at 06:36PM PST, ID: 18603789

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 07:49PM PST, ID: 18603966

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 08:50PM PST, ID: 18604098

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 09:01PM PST, ID: 18604128

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 09:31PM PST, ID: 18604195

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), Microsoft Access Database, Microsoft IIS Web Server
Tags: send
Sign Up Now!
Solution Provided By: b0lsc0tt
Participating Experts: 4
Solution Grade: A
 
 
[+][-]02.25.2007 at 06:50AM PST, ID: 18605106

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.25.2007 at 07:24AM PST, ID: 18605195

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.25.2007 at 07:41AM PST, ID: 18605229

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.26.2007 at 11:15AM PST, ID: 18611567

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 08:59PM PST, ID: 18631169

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 09:03PM PST, ID: 18631183

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.01.2007 at 08:38AM PST, ID: 18633672

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32