I wrote this scriptor componnt to mail receipt to the customers once
they place the order.
Next I added the send mail component to the pipeline and entered the
smtp values and stuff.
When I place an order all i get is a blank email i think its not
capturing the _email_subject and _email_body values from the scriptor
component as I did add these fields in the SMTP component.
What is it Iam doing wrong over here..Am I missing any
thing(registering the scriptor component or anything apart from
this)....
Please help......
function MSC***ecute(config, orderform, context, flags)
Dim dataFunctions
Dim msgBody
Set dataFunctions=context.DataFunctions
orderform.[_email_subject]="Order Confirmation #: " & _
orderform.[orderform_id]
msgBody="Thank you for your order, " & chr(10) & chr(13)
& _
"Order id : " &orderform.[orderform_id] & chr(10) &
chr(13) & _
"Order Date : " &
dataFunctions.Date(orderform.[d_DateLastChanged]) & _
chr(10) & chr(13) & _
"Order Total : " & _
dataFunctions.Money(CLng(orderform.[saved_cy_total_total])) & _
chr(10) & chr(13) & chr(10) & chr(13)
'Loop through ****pping addresses
Dim ****pments
****pments=orderform.[****pments]
msgBody=msgBody & "****pping Addresses" & chr(10) &
chr(13)
for each ****pment in ****pments
****ppingAddressid=****pment.[****pping_address_id]
****ppingAddress=orderform.[Addresses].Value(****ppingAddressid)
msgBody=msgBody & "****p by :" &
orderform.[****pping_method_name] & _
chr(10) & chr(13)
msgBody=msgBody & ****ppingAddress.[address_name] & chr(10)
& chr(13) & _
****ppingAddress.[address_line1] & chr(10) & chr(13)
if Len(****ppingAddress.[address2])>0 Then _
msgBody=msgBody & ****ppingAddress.[address_line2] & chr(10)
& chr(13)
msgBody=msgBody & ****ppingAddress.[city] & " , " & _
****ppingAddress.[region_code] & " " &
****ppingAddress.[postal_code] & _
chr(10) & chr(13) & chr(10) & chr(13)
next
orderform.[_email_body]=msgBody
MSC***ecute = 1
end function
sub MSCSOpen(config)
end sub[/code]