macromedia.dreamweaver.appdev
[Top] [All Lists]

Re: User Exists

Subject: Re: User Exists
From: "LJG"
Date: Wed, 1 Aug 2007 16:53:50 +0000 UTC
Newsgroups: macromedia.dreamweaver.appdev

Hi Paul -G,

 can you advise the structure of the CDOsys method. Each time I have tried to 
add form fields, and i this case they will be hidden feilds, the CDOsys fails.

 The hardcoded stuff works fine, just when I want to add form data

 Do I have to declare the variables first ie.

 dim strFirst
 dim strLast
 dim strEmail
 Dim objMail 
 Set objMail = Server.CreateObject("CDO.Message") 
 Set objConfig = Server.CreateObject("CDO.Configuration") 

 emailAddress = Request.Form("strEmail")
 firstName = Request.Form("strFirst")
 lastName = Request.Form("strLast")

 'Configuration: 

 objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort
 objConfig.Fields(cdoSMTPServer)="mysmtp" 
 objConfig.Fields(cdoSMTPServerPort)=25 
 objConfig.Fields(cdoSMTPAuthenticate)=cdoBasic 
 objConfig.Fields(cdoSendUserName) = "xxxxxxxxxxx"
 objConfig.Fields(cdoSendPassword) = "xxxxxxxxxxxx"

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

 objMail.From ="website@xxxxxxxxxxxxxxxxxxxx" 
 objMail.To = "les@xxxxxxxxxxxxx"
 objMail.Subject ="Website Enquiry" 
 objMail.TextBody="This is to let you know a users has just added details to 
our database" 
 objMail.Body = "emailAddress"
 objMail.Body = "firstName"
 objMail.Body = "lastName"
 objMail.Send ()

 if Err.Number = 0 Then
        'Response.Write("Mail sent")
 Else
        response.write("Error Sending Mail.Code: " & Err.Number)
        Err.Clear
        End if
 End if
 Set objMail = Nothing  
 Set objConfig=Nothing 


 Regards




<Prev in Thread] Current Thread [Next in Thread>