Forum Home Forum Home > Legacy Products > SalesCart Standard / PRO / SQL
  New Posts New Posts RSS Feed - Sun One ASP and salescart?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedSun One ASP and salescart?

 Post Reply Post Reply
Author
Message
Lonewolf View Drop Down
Newbie
Newbie


Joined: June/06/04
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lonewolf Quote  Post ReplyReply Direct Link To This Post Topic: Sun One ASP and salescart?
    Posted: October/16/06 at 9:32am
I moved my shopping cart to a new server. I could not get the shopping cart to send e-mail. But if I out included files sendmail.asp and merc-conf.asp out then the shopping cart would work. I got hold of support and they sent me a working sample of their send mail code. There were small differents in the code and I look round and found out the use Sun One ASP v4 on their servers. I take it you used Microsoft ASP 3? And the two don't play well togeather do they
I take it all the send mail code will have to be rewriten?

LW
Back to Top
admin View Drop Down
Admin Group
Admin Group

Forum Administrator

Joined: March/11/04
Status: Offline
Points: 329
Post Options Post Options   Thanks (0) Thanks(0)   Quote admin Quote  Post ReplyReply Direct Link To This Post Posted: October/16/06 at 10:49am
Do you know what kind of "SMTP" mail service your ISP supports. We have plugins for aspmail, aspemail, jmail, and a few others. In SalesCart NET this is all included as well and you can switch to a different SMTP mail service. You need to find out what mail service that do support. If they support none, then theres no target to even "rewrite" the code. Most likely, they support one of the other ones we already have stuff for.
Back to Top
Lonewolf View Drop Down
Newbie
Newbie


Joined: June/06/04
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lonewolf Quote  Post ReplyReply Direct Link To This Post Posted: October/16/06 at 12:07pm
Their windows servers use CDOSYS. I setup salescart to use cdosys and I still can not get it to work. Here is the working code that they sent me.

Here is a working example of CDOSYS:
<%@ Language=VBScript %>
<%
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Const cdoSendUsingPort = 2
StrSmartHost = "localhost"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendus ing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpse rver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpco nnectiontimeout") = 10
.Update
End With
strBody = "This is a test of sending an email via ASP" & vbCrLf & vbCrLf
strBody = strBody & "This is line 2. " & vbCrLf
strBody = strBody & "you can have as many as you want" & vbCrLf
strBody = strBody & "THIS IS AN AUTOMATED EMAIL - PLEASE DO NOT REPLY"
' apply the settings to the message
With iMsg
Set .Configuration = iConf
.To = "sarwan.jassi@lunarpages.com"
.From = "lptest@lwsales.com"
.Subject = "This is a test message from an ASP Email"
.textbody = strBody
'redirect code goes here
.Send
End With
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>


now here is the code that I found in Cmail.

Private Sub BuildCDOSYSMessage()
           Dim objCDOSYSCon
           Dim objCDOSYSMail

           Set objCDOSYSMail = Server.CreateObject("CDO.Message")
           Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/smtpserver") = strMailServer
           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

           If strAuthUser <> "" Then
           ' Setup server login information if your server require it
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/smtpauthenticate") = 1
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/sendusername") = strAuthUser
           objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/config uration/sendpassword") = strAuthPW
           End If

           objCDOSYSCon.Fields.Update
           Set objCDOSYSMail.Configuration = objCDOSYSCon
           objCDOSYSMail.From = strFromAddress

           For Each Item In objRecipients
                Select Case CInt(objRecipients(Item)(1))
                      Case 1
                           objCDOSYSMail.To = objRecipients(Item)(0)
                      Case Else
                           objCDOSYSMail.To = objRecipients(Item)(0)
                 End Select
           Next

           objCDOSYSMail.Subject = strSubject

           If strMailType = "HTML" Then
                objCDOSYSMail.HTMLBody = strBody
           Else
                strBody = Replace(strBody,chr(13),VbCrLf)
                objCDOSYSMail.TextBody = strBody
           End If

           Set objMail = objCDOSYSMail

           Set objCDOSYSMail = Nothing
           Set objCDOSYSCon = Nothing
     End Sub

I tryed to make some changes but I am not a coder.
Now if I rename the code file to Cmail.asp and updated my site I do get mail.But i get mail as soon as i click on a product page. and I get mail sent to me for every page in the shopping cart you go to place a order.

lw
Back to Top
admin View Drop Down
Admin Group
Admin Group

Forum Administrator

Joined: March/11/04
Status: Offline
Points: 329
Post Options Post Options   Thanks (0) Thanks(0)   Quote admin Quote  Post ReplyReply Direct Link To This Post Posted: October/16/06 at 2:08pm
We document the changes necessary to use CDosys in our KB. http://support.salescart.com/kb/KB-details.asp?key=5316

Either that, or you might want to look to upgrading to SalesCart NET which supports CDosys natively.
Back to Top
Lonewolf View Drop Down
Newbie
Newbie


Joined: June/06/04
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lonewolf Quote  Post ReplyReply Direct Link To This Post Posted: October/16/06 at 3:11pm
[QUOTE=admin] We document the changes necessary to use CDosys in our KB. http://support.salescart.com/kb/KB-details.asp?key=5316

Been there did that. It worked on the other server but not this one.

lw

Edited by Lonewolf
Back to Top
Lonewolf View Drop Down
Newbie
Newbie


Joined: June/06/04
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lonewolf Quote  Post ReplyReply Direct Link To This Post Posted: October/17/06 at 10:38am
Will the way the shopping cart is coded to send
e-mail as coded, work on a server that is running Sun One asp? I'm asking because there a small differences in the way it is coded to do the same thing.

LW
Back to Top
mikeb View Drop Down
Admin Group
Admin Group
Avatar

Joined: March/17/04
Location: United States
Status: Offline
Points: 194
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikeb Quote  Post ReplyReply Direct Link To This Post Posted: October/18/06 at 9:40am
Not sure about this...
The example you have posted is pretty much what we do in Cmail. I think a lot of folks get the "mail server" address wrong for Cdosys. They put down their "real" mail server address instead of their "mail service" mail server address.

I think your would have to do code level debug to try and figure out whats going on...and 9 out 10 times when we do that based on the KB, we come up with a problem on the server. All kinds of reasons why this won't work and it may have absolutely nothing to do with the code.
Back to Top
Lonewolf View Drop Down
Newbie
Newbie


Joined: June/06/04
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lonewolf Quote  Post ReplyReply Direct Link To This Post Posted: October/18/06 at 10:49am
Originally posted by mike mike wrote:

Not sure about this...
The example you have posted is pretty much what we do in Cmail. I think a lot of folks get the "mail server" address wrong for Cdosys. They put down their "real" mail server address instead of their "mail service" mail server address.

.


    as in my ("real" mail server address )
mail.lwsales.com

"mail service" mail server address



lw
Back to Top
Lonewolf View Drop Down
Newbie
Newbie


Joined: June/06/04
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lonewolf Quote  Post ReplyReply Direct Link To This Post Posted: October/18/06 at 11:43am
Ok I just found out that it is not sun one asp the server is running. My missunderstanding on that one. But is runing on ASP.NET Would that be the problem?

lw
Back to Top
admin View Drop Down
Admin Group
Admin Group

Forum Administrator

Joined: March/11/04
Status: Offline
Points: 329
Post Options Post Options   Thanks (0) Thanks(0)   Quote admin Quote  Post ReplyReply Direct Link To This Post Posted: October/18/06 at 1:58pm
Its is not your mail server address were you get your regular POP based Web-based email. CDOSYS is a mail service that runs on a server. It too is a Mail server with its own Mail server address....thats the address you need. Only your ISP will know what that is. About 60% of the time you can use 127.0.0.1 or localhost as its on the same server your website is on....but its not 100%.

And, we sell SalesCart .NET which runs on asp.net and full supports CDOSYS as well as a bunch of other mail clients...more than any of our other products.... That was indicated in a previous post. Your problem would best be solved by upgrading to SalesCart NET.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.04
Copyright ©2001-2015 Web Wiz Ltd.

Copyright 2015 by ComCity® LLC and SalesCart™.  All Rights Reserved