Print Page | Close Window

Sun One ASP and salescart?

Printed From: SalesCart
Category: Legacy Products
Forum Name: SalesCart Standard / PRO / SQL
Forum Description: All questions pertaining to SalesCart Standard, PRO and SQL should be posted here.
URL: http://forum.salescart.com/forum/forum_posts.asp?TID=640
Printed Date: November/23/24 at 7:56pm
Software Version: Web Wiz Forums 11.04 - http://www.webwizforums.com


Topic: Sun One ASP and salescart?
Posted By: Lonewolf
Subject: Sun One ASP and salescart?
Date 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



Replies:
Posted By: admin
Date 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.


Posted By: Lonewolf
Date 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


Posted By: admin
Date 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.


Posted By: Lonewolf
Date 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


Posted By: Lonewolf
Date 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


Posted By: mikeb
Date 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.


Posted By: Lonewolf
Date 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


Posted By: Lonewolf
Date 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


Posted By: admin
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.04 - http://www.webwizforums.com
Copyright ©2001-2015 Web Wiz Ltd. - http://www.webwiz.co.uk