| Author |
Topic Search Topic Options
|
NISSANGTIR
Groupie
Joined: 20 April 2004
Location: United Kingdom
Status: Offline
Points: 85
|
Post Options
Thanks(0)
Quote Reply
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?
|
 |
daystoolate
Newbie
Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
|
Post Options
Thanks(0)
Quote Reply
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?
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
daystoolate
Newbie
Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
|
Post Options
Thanks(0)
Quote Reply
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.
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
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
daystoolate
Newbie
Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
daystoolate
Newbie
Joined: 23 July 2004
Location: United States
Status: Offline
Points: 9
|
Post Options
Thanks(0)
Quote Reply
Posted: 23 July 2004 at 3:05pm |
|
HELP!!!
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |