Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - CDOSYS Mail Form ? Anyone ?!?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CDOSYS Mail Form ? Anyone ?!?

 Post Reply Post Reply Page  <123>
Author
NISSANGTIR View Drop Down
Groupie
Groupie


Joined: 20 April 2004
Location: United Kingdom
Status: Offline
Points: 85
Post Options Post Options   Thanks (0) Thanks(0)   Quote NISSANGTIR Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2004 at 6:21am
OK - it took me about an hour but I think I have mastered CDOSYS!!
 
I must say, it really is much better than CDONTS! WOW never thought I would have said that..lol
 
I have created a FREE form for everyone to use on their website, it has all the usual fields! - It is all ready configured all you have to do is change the .... objMail.To = "TYPE YOUR E-MAIL ADDRESS HERE" to your e-mail address AND thats it
 
 
Hope this helps everyone?
Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 1:49pm
i have written the following code.

<%

'Integrated email
'Dimension variables
   Dim objCDOSYSCon
         
         Set objCDOSYSMail = Server.CreateObject("CDO.Message")
          Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
              
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/smtpserver") = strSmtpServer
               objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/ configuration/smtpauthenticate") = 1
          objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/sendusername") = "mail@hootinanny.net"
          objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/sendpassword") = "**********"
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/smtpserverport")  = 25
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/sendusing") = 2
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/smtpconnectiontimeout") = 60
                objCDOSYSCon.Fields.Update
      
         Set objCDOSYSMail.Configuration = objCDOSYSCon
         objCDOSYSMail.From = Request("from")
         objCDOSYSMail.To = "mail@hootinanny.net"
         objCDOSYSMail.Subject = Request("subject")
         objCDOSYSMail.TextBody = Request("message")
         If strSmtpServer <> "" Then objCDOSYSMail.Send            
         Set objCDOSYSMail = Nothing
         Set objCDOSYSCon = Nothing
%>


which is the file send_mail.asp

and on the page layer_sx.asp, i have hard coded the following.

<%
'************** SEND IDEAS **************

Sub Ideas()
%>
<%
If Ublogtype = "open" Then
   If Not bLoggedIn Then
%>
<table align="center" width="90%">
<tr>
<td class='sidetitle' align="left">IDEAS</td>
</tr>
<tr>
<td align="center">
You must be logged in to use<br>
this feature.<br>
For security reasons,<br>
please <a href="login.asp">Log In</a></td>
</tr>
</table>
<%
    Else
%>
<table width="90%" align="center">
<tr>
<td class='sidetitle' align="left">IDEAS</td>
</tr>
<tr>
<td align="center">
<form method="post" action="include/send_mail.asp">
User: <INPUT type="hidden" name="from" value="<% = Session("UblogEmail")%>"> <% = Session("UblogEmail") %> <br />
Subject: <INPUT type="hidden" name="subject" value="User Submission">User Submission<br />
Message:<br>
 <TEXTAREA name="message" rows=10 cols=20></TEXTAREA><br />
<INPUT type="submit" value="Send" name="submit">
</form>
</td>
</tr>
</table>
<%
    End If
End If
%>
<% End Sub %>


When i submit this form, all i get is a blank page and no email. What am i missing?
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 2:13pm

I assume that the first file is named send_mail.asp and that it is in the include directory under the same directory where the second file is located.

Down at the end of the code for the first file, you say send the mail if the strSmtpServer isn't blank, but you never put anything into it.

Right after you do the Set statements in the first file, you'll have to put the mail server you're using into strSmtpServer - e.g.
   strSmtpServer = "mail.hootinanny.net"
   strSmtpServer = "smtp.hootinanny.net"
   strSmtpServer = "localhost"
Your web host can tell you what server you're supposed to use.

 

 


Lead me not into temptation... I know the short cut, follow me.
Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 2:24pm

DUH.
I should have seen that. Thank you.

Okay, now i added that, and im getting this error.

Quote

error '80040211'

/include/send_mail.asp, line 25

 

Line 25 is the following.

If strSmtpServer <> "" Then objCDOSYSMail.Send 


Should i take that If out?



Edited by daystoolate
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 2:27pm
Been There. Done That, Got a whole bunch of tee-shirts

Lead me not into temptation... I know the short cut, follow me.
Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 2:33pm

thats not exactly the answer i was looking for..

i took the if statement out and got the same error.



Edited by daystoolate
Back to Top
daystoolate View Drop Down
Newbie
Newbie
Avatar

Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote daystoolate Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 3:05pm
HELP!!!
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2004 at 3:11pm

The if statement isn't the problem now. Now the problem is this statement...
 objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/ config uration/smtpserver") = strSmtpServer

Before you run that statement. you have to have strSmtpServer set to something.


Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply Page  <123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.