Hi Gianluigi,
thanks for your response. Below is the code that is generated from the email order component of the shopping cart. Below that are the instructions from my host regarding the use of JMail on the hosting plan.
<% '********************** ' DwZone Shopping Cart ' Send Order Mail ' Version 1.3.4 '********************** objCart.MailSend = "1" objCart.MailParameters = "4@[email protected]@__@ @__@ @__@ @__@ @__@ @__@Order Confirmation@__@[email protected]@__@ @__@[email protected]@__@@_start_@(rsGetUserLogin.Fields.Item(@_''_@CustomerFirstName@_''_@).Value)@_end_@@__@@_start_@(rsGetUserLogin.Fields.Item(@_''_@CustomerEmail@_''_@).Value)@_end_@@__@ @__@@_start_@(rsGetUserLogin.Fields.Item(@_''_@CustomerEmail@_''_@).Value)@_end_@@__@ @__@0@__@1@__@1@__@Order Confirmation@__@us-ascii;20127;US-ASCII" objCart.MailBodyHeader = "Dear, <dwzPerc=(rsGetUserLogin.Fields.Item(dwzVirgCustomeFirstNamedwzVirg).Value)dwzPerc> <dwzPerc=(rsGetUserLogin.Fields.Item(dwzVirgCustomerLastNamedwzVirg).Value)dwzPerc>dwzErredwzCrLfdwzErredwzCrLfThank you for your order. Here is confirmation for your records:" objCart.MailBodyFooter = " " objCart.MailCartColumns = "Quantity;;0;N;0;|ProductCategory;;0;N;0;$|ProductType;;0;N;0;|ProductName;;0;N;0;|ProductDescription;;0;N;0;|UnitPrice;;0;N;0;|ItemColour;;0;N;0;|ItemSize;;0;N;0;|TotalPrice;;0;N;0;" objCart.MailColumnsSetup = "Arial, Helvetica, sans-serif@__@Arial, Helvetica, sans-serif@__@#FFFFFF@__@#000000@__@1@__@1@__@1@__@0@__@#999999@__@#E8E8E8@__@1@__@$@__@1@__@2" objCart.MailDetailOrder = "1@__@Order amount@__@0@__@Order discount@__@0@__@Order Gift@__@0@__@Order net@__@0@__@Shipping@__@0@__@undefined@__@0@__@@__@0@__@@__@0@__@@__@0@__@Taxable amount@__@0@__@Tax amount@__@1@__@Grand total" 'Send Order Mail End Code %>
Below is a simple script example for sending email using JMail on our Windows servers...
You can use this in your own scripts- A brief description of each parameter required...
sTo : A single email address to send to, this has simple validation to make sure there is not more than one address to prevent hijacking
sFrom : The address the is to be sent from
NOTE : Either the To or From address needs to be based on the domain you are sending from
sSubject : The subject line for the email
sPlainBody : The plain text version of the email, can be left empty if required
sHTMLBody : The HTML version of the email, can be left empty if required
Sub emailTo (sTo, sFrom, sSubject, sPlainBody, sHTMLBody) gSMTPserver = "mail.dc-servers.com" ' Enter values below if SMTP authentication is required gSMTPauthUser = " gSMTPauthPass = " If sTo <> " Then If InStr(sTo, ",") > 0_ Or InStr(sTo, ";") > 0_ Or InStr(sTo, " ") > 0_ Or InStr(sTo, Chr(10)) > 0_ Or InStr(InStr(sTo, "@") + 1, sTo, "@") > 0 _ Then ' Do not send email, may want to log this... ' This is a possible email hijack Response.Write ("Error:Email not sent") Else ' Carry on and email Set JMail = CreateObject("JMail.Message") JMail.AddRecipient sTo, sTo JMail.From = sFrom JMail.Subject = sSubject If Len(sPlainBody) > 0 Then JMail.Body = sPlainBody End If If Len(sHTMLBody) > 0 Then JMail.HTMLBody = sHTMLBody End If If Len(gSMTPauthUser) > 0 Then JMail.MailServerUserName = gSMTPauthUser JMail.MailServerPassword = gSMTPauthPass End If If not JMail.Send(gSMTPserver) then ' There was an error - print the error log Response.write ("Error:" & JMail.log) End If Set JMail = Nothing End If End If End Sub
|
|
|