Order Confirmation Emails -

Hi All.
I have an orderconfirmation page that sends out an email to
both the
customer and myself.
The page uses an include that sets the details for CDONTS and
also the body
of the email (see code below)
All works fine, but now i want to send two versions of the
confirmation
email, one to the customer and one to myself. The reason for
the need for
two versions is that my version will have, in addition, a
simple table with
boder to allow me to add notes for processing reasons.
When i put two includes on the order confirmation page (one
for each email)
only one is executed!! - and it's always the second include.
I have to admit that im not too familiar with using
functions, so i'm not
even sure if this is possible.
Please see code below:
OrderConfirmation.asp
<!--#include file="functions_email_ourcopy.asp" -->
<!--#include file="functions_email.asp" -->
<%
SendEmail CustomersRS("CustomerEmail")
%>
Functions_email_ourcopy.asp
<%
'Start the functions
function SendEmail(c)
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "[email protected]"
objMail.To = c
objMail.Bcc = ""
objMail.CC = "" 'Maybe send a CC to your sales office
objMail.Subject = "Order from Website"
objMail.Body = Mailbody
objMail.MailFormat=0
objMail.BodyFormat=0
objMail.Send
Set objMail = Nothing
end function
function SiteRoot
'This function tries to ascertain the site root. If it's
wrong, enter your
own manually
CurrentPage=Request.ServerVariables("SCRIPT_NAME")
SiteRoot="
http://" &
Request.ServerVariables("SERVER_NAME") &
left(CurrentPage,instrrev(CurrentPage,"/"))
end function
Function Mailbody
'on error resume next
Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
' Call the remote machine the request
objXML.open "POST", SiteRoot & "email_ourcopy.asp", False
objXML.SetRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
objXML.send("OrderID=" & OrderID)
' return the response
Mailbody = objXML.responsetext
' clean up
Set objXML = Nothing
End Function
%>
Functions_email.asp
<%
'Start the functions
function SendEmail(c)
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "[email protected]"
objMail.To = c
objMail.Bcc = ""
objMail.CC = "" 'Maybe send a CC to your sales office
objMail.Subject = "Order from Test4Less Website Customer
Copy"
objMail.Body = Mailbody
objMail.MailFormat=0
objMail.BodyFormat=0
objMail.Send
Set objMail = Nothing
end function
function SiteRoot
'This function tries to ascertain the site root. If it's
wrong, enter your
own manually
CurrentPage=Request.ServerVariables("SCRIPT_NAME")
SiteRoot="
http://" &
Request.ServerVariables("SERVER_NAME") &
left(CurrentPage,instrrev(CurrentPage,"/"))
end function
Function Mailbody
'on error resume next
Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
' Call the remote machine the request
objXML.open "POST", SiteRoot & "email.asp", False
objXML.SetRequestHeader "Content-Type",
"application/x-www-form-urlencoded"
objXML.send("OrderID=" & OrderID)
' return the response
Mailbody = objXML.responsetext
' clean up
Set objXML = Nothing
End Function
%>

Hey - Thanks Dooza
I will be working on this tomorrow and report back - much
appreciated
Regards
Andy
"Dooza" <[email protected]> wrote in message
news:gkpufc$d2e$[email protected]..
> Andy wrote:
>> Hi All.
>> I have an orderconfirmation page that sends out an
email to both the
>> customer and myself.
>> The page uses an include that sets the details for
CDONTS and also the
>> body of the email (see code below)
>> All works fine, but now i want to send two versions
of the confirmation
>> email, one to the customer and one to myself. The
reason for the need for
>> two versions is that my version will have, in
addition, a simple table
>> with boder to allow me to add notes for processing
reasons.
>>
>> When i put two includes on the order confirmation
page (one for each
>> email) only one is executed!! - and it's always the
second include.
>> I have to admit that im not too familiar with using
functions, so i'm not
>> even sure if this is possible.
>
> You are including the same function twice, then only
sending one, the
> second time you include the function it overwrites the
first, so when you
> call it, it only sends to the second one.
>
> The solution? Rename the function in the second one,
then call it after
> you call the first one.
>
> <!--#include file="functions_email_ourcopy.asp"
-->
> <!--#include file="functions_email.asp" -->
> <%
> SendEmail CustomersRS("CustomerEmail")
> SendEmail2 CustomersRS("CustomerEmail")
> %>
>
> You might end up with the same content in both, as you
have another
> function called Mailbody that is defined twice, so you
may need to rename
> that, and where it is called as well.
>
> Dooza

Similar Messages

  • No order confirmation email / no items in order staus,

    I placed an order this morning have not received confirmation email yet. I cannot see any items in the order status, either. Could you check if the order has processed? Thank you.

    Hi there hyongju, 
    Welcome to the forum and thank you for shopping with us! When placing any order, receiving an order confirmation is crucial in your reassurance that your order has been received and is being processed. I'm truly sorry you may not have yet received an order confirmation for a recent order, and if this has caused you any concern. 
    Due to some maintenance on BestBuy.com last night, some order confirmation emails were delayed. We do fully expect these confirmation emails to push through our systems this afternoon. With that said, I was unable to locate your order in our systems, so I would like to look further into this. You may check your private messages by signing into the forum then clicking the envelope icon in the top right corner of the page. 
    Sincerely, 

  • IPhone 6 Plus Order Confirmation Email and Ship Date???

    Verizon Wireless Customer Support ,
    I pre-ordered the iPhone 6 plus on 9/12/14. I have yet to receive an order confirmation email and I have had 3 different CSRs tell me via phone three different possible ship dates. Can you please give me some clarity on this situation and possible give me my order information so that I may track it myself??
    Thanks,
    Gena

        I can only imagine how anxious you are about your pre-order.
    I would love to check on it for you since you never received the confirmation email,glmoore08.
    Once we get the order confirmation number, you can check the order status here http://bit.ly/RjmCUB.
    Please look out for a direct message from me.
    TamaraH_VZW
    Follow us on Twitter @VZWSupport

  • No order confirmation email

    I just order from best buy and it shows up in my recent orders but I have not yet received a confirmation email, I have checked spam folder and it's not there either. I placed a previous order today which I got the confirmation email for instantly. Is my order successfully placed?

    Hello cbatra507,
    I can understand your concern if you placed an order, but didn’t receive an order confirmation email. To clarify, some of our emails became slightly delayed, including the order confirmation emails. I apologize for any worry this may have caused you!
    If you haven’t recently checked, please feel welcome to check your email inbox as well as spam folders for an order confirmation email. If you haven’t received one, you may also check your Order History after logging into BestBuy.com to ensure your order was placed successfully.
    If you should need further assistance, please let me know!
    Sincerely,
    Tasha|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Order Confirmation: Email as a PDF Document

    Hi Experts,
    I have a requirement that whenever the Sales Order gets created for specific Sales Org (for example S.Org 1022 only and not for 1023, 1024) and spcific Division (only 02 out of 02, 03, 04), it should trigger a mail with pre-draffted mail contents and a copy of Order Confirmation as an attachment in PDF format.
    This mail should be sent to the mail id maintained in the definition of Sales Office.
    Can this be mapped with Output determination? (I wanted to confirm it before doing because I have worked with Output determination but I have never used simple mail or EDI or External Send as a Transmission Medium)
    I came up with 2 possibilities
    1. Output Determination
    2. Workflow (I dont know workflow at all)
    Can somebody suggest me what is the proper way to map this requirement?
    Quick reply will be appriciated.
    Thanks in advance.
    Best Regards,
    HP

    T Code NACE
    Create new Output type and assign access sequence based on your required fields. Assign the output program and smart forms to the output type and the partner function (may be SP) and default medium.
    Output program should be able to read the sales office of the sales order sold to and then get the Email from it, else you can add a new partner function as contact person to the sold to and have the sales office Email ID in the contact person. The putput program can pick the contact persons email much easily than the sales office Email .  Work with your ABAP person to get the putput program created as per your requirements.
    Create the condition record for your output type. So once the output program is ready, you can process order for the relevant sales order and the output should get triggered in the order . based on the medium you assigned in the output condition type and / or output condition record it will be processed.
    Hope this helps
    Regards
    Sai

  • Order Confirmation Email

    Hi
    Placed an order about 3 hours ago for new broadband and phone. Had expected an immediate email confirmation but so far nothing has arrived. I've logged into my account on BT.com but without a VOL number I can't check or track my order. Any ideas how long it's likely to take to receive this email?
    tia

    Welcome to the forum. In my experience confirmation emails come very quickly or not at all, but that may or may not be the general rule. I'd give it till midday tomorrow then ring the Options Team on 0800 800 030. Ignore the welcome to BT Business and say "existing order" or similar when asked why you're calling. They're UK based and tend to be helpful.
    You can click the white star next to this message if you think it was helpful.

  • Text Replacement for Order Confirmation Email

    Have an output type setup to send email to an external contact person. Need to know the program and FORM routine to use for sales documents in order to pull the Purchase Order # and put it on the subject line. I did this for shipping notifications using program SAPMV50A and FORM MAIL_TEXTS but it doesn't work for Sales Orders. I'm hoping someone has implemented this and can pass on the knowledge.
    Will reward points, promise.
    Thanks!!!
    Jim

    Ive also tried SAPMV45A with TEXT_SYMBOL_REPLACE
    specified Order Confirmation for PO: &VBAK-BSTNK& in the subject title but we only get
    Order Confirmation for PO:
    any ideas?

  • Re: No Order Confirmation Email / Cannot Find Order Online

    I am having the same issue as the creator of this thread
    I just bought the Rocketfish™ - Wii U InvisiShell - Transparent at 12:41am but except I choosed to have it shipped and I have not yet recieved a text or an order confirmation e-mail stating that you recieved my order and my order isn't even showing up in the Order Status when it says Please note: It may take up to 15 minutes for new orders to show up in your account.
    What is going on here?

    Hi xBecky83,
    Thank you for taking the time to post to the forum!
    How are you to know your order was received if you did not receive a confirmation email?  I looked over your account and it appears that we have multiple email addresses on file, which could potentially cause an email to be redirected.  I would encourage you to check your email accounts spam/junk folder just to be sure the confirmation email was not sorted into one of those folders.
    From what I can see, your order has officially shipped and is currently in-transit.  I want for you to be able to monitor your package, so I am going to send you a private message with the UPS tracking number.  To check your private messages, you will want to log into the forum and click on the envelope icon at the top of the page.
    I hope you have a wonderful day.
    Derek|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Service order confirmation email and fax

    Hi all,
    I am looking for how to send emails or faxes when a service order is confirmed? Can anyone please help me do that?
    I understand that SMTP service should be enabled & SAP Connect should be configured but how to trigger the email on Service order confirmation?
    For Sending Fax do we need to have Fax software or we can use SMTP to send Fax? For using SMTP-Fax scenario what will be required?
    thanks,
    LSP

    Hi,
    Set up an Action to trigger upon save that is linked to the relevant SMARTFORM. Make sure it is configured as e-mail.
    Cheers
    Colin.

  • Still haven't got my order confirmation email...

    It's been 36 hours since I pre-ordered my iPhone 5 and still haven't received my confirmation email. Anyone else having the same problem?

    I spoke to a verizon representative today, and they sent me a text with order number and confirmation number, and Deliver by 09/21/12. Call them on monday. We spoke for about 5 min, I think  they spoke longer than they should have. They are very tired from taking so many orders. . As long as you have your order # and conformation #. It has to say 9/21/12. They also know when you put the order in by your verizon #. If it says 9/21/12 you beat the rush hour, those were the exact words. They stated you will receive an email, and tracking number when it ships next week. I hope this helps everone.

  • Still haven't received order confirmation email

    I ordered my iPhone at about 1 am last night. I can use the order confirmation # they gave me at checkout to check my status, but my checking account hasn't been charged yet, and I haven't received a confirmation email yet (it said I would within two hours due to traffic). When will I receive this email and if the order tracking page says expecte ship date: 10/28, does that mean I will get it on the 28th?

    I have asked a moderator to provide assistance, they will post an invite on this thread.
    They are the only BT employees on this forum, and are a UK based team of people, who take personal ownership of your problem.
    Once you get a reply, if you click on their name, you will see a screen like this. Click on the link as shown below.
    Please do not send them a personal message, as they may not be on duty for a long time, and your message will not be tracked properly.
    For your own security, do not post any personal details, on this forum. That includes any tracking number you are give.
    They will respond either by phone or e-mail within 5-6 working days.
    Please use the tracked e-mail, to reply, not via the forum. Thanks
    This is the form you should see when you click on the link. If you do not see this form, then you have selected the wrong link.
    When you submit the form, you will receive an enquiry number, so please keep a note of it
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • Purchase orders - confirmation email to buyer

    Hello experts.
    What should I do to the buyer receives an email confirmation of purchase order?
    thanks,
    AlePaes
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Nov 21, 2011 6:14 PM

    You need to configure Output determination on the Sales order type, so that a Order response output type (like BA00) with email is triggered once the order is saved in the system.
    Search on these forums on how an outbound Order response output is configured

  • Sales Order Confirmation Email in CRM

    Hi Experts,
    The requirement is to send an email as soon as the sales order is saved in CRM.
    I am using action profile for this and in action profile i have used the following:
    Time of processing: When saving the document
    Assigned Processing: Smart forms Mail
    Form Name: CRM_ORDER_CONFIRMATION_01
    Processing Class: CL_DOC_PROCESSING_CRM_ORDER
    Processing Method: CRM_ORDER_EXEC_SMART_FORM
    I have made it partner dependent and its taking the email id mentioned in the sold to party as expected.
    When i create a sales order and save it. I get the following error:
    Error when sending to 'Email mentioned in sold to party'
    Error during send process
    Action could not be executed successfully.
    Could you please assist me in this.
    Thanks and Regards,
    MG

    Hello,
    I believe the error which you are getting is displayed is the processing log in the action tab in CRmd_order.
    Please do the following and let me know.
    Can you check the SCOT ->SMTP settings in CRM system.?
    Also go to SOST and check status. Please try tu push the mail from there.
    Also, make sure that the email ID used in SP is allowed in the client domain.You can check this with the client basis team.
    Hope this helps.
    Regards
    Sanjib

  • Order confirmation and email confirmation not have same information?!?

    I just place an order online, I don't know why the order confirmation email does not have the same information as the original order confirmation.  
    After I hit the button to place the order, the order confirmation page clearly showed:
    -  the installation appt on July 23, 2015 8:00 AM - 9:00 AM in green color
    -  the order summary include "$350 Visa prepaid card" in green color
    -  the estimate bill is 154.92
    But in the email confirmation, it provided  total different thing:
    - no where on the email order confirmation  said about $350 Visa prepaid card.
    - the installation appt somehow change to July 28, 2015 8:00AM - 5:00 PM (<- move to 5 days later with an 8 hours window to expect people to take whole day off  from work to get installation?)
    - the estimate bill become 241.22 (<- move up 86.3)
    Does the email confirmation have the wrong information or Is it normal that Verizon automatically make change to the order after it submitted? Bill increase, date install change and no more prepaid card?

    Note the bill estimate on the email may have certain extra charges, hopefully all correct.  You will need to check when you get actual bill.  Things like install fee (if not waived) and partial month charges.  I don't remember if other taxes and fees are also included on one but not the other. YOU ARE NOT TALKING TO VERIZON ON THESE FORUMES.  The forums are mostly peer to peer.

  • Order confirmation mail not received

    My self Puneet Garg. I applied for Diwali utsav offer voucher redemption. Till today order confirmation email not received. My mobile no[Personal Information Removed]. I am waiting for the same so that I can send documents by post

    Thank you for visiting the HP Support Forums. I'm sorry but this is a peer-to-peer community of HP customers, and not a venue to contact HP directly. Most of the users here are consumers like yourself who are offering solutions because they like to help others, and any HP employees you see are here on their own capacity and not representing the company.
    If you have additional or direct feedback for HP about their products or services, or questions about repair, you can use the link below for contact information.
    http://www8.hp.com/us/en/contact-hp/ww-contact-us.html
    If you have other questions and concerns about using the forum, please feel free to send me a private message.
    OrnahP
    HP Support Forums Moderator
     Clicking the "Kudos Star" to the left is a great way to say thanks!
     When your problem has been solved, accept the solution by clicking "Accept as Solution" to help other members in the future!
    Rules of Participation

Maybe you are looking for

  • VIDEO WON'T PLAY ON MY IPOD! WHAT DO I DO?!?!

    I can download music videos from iTunes fine, and can play them on iTunes fine, but when it is exported to my U2 iPod and I select a video to play, it doesn't play. Instead it goes to this black screen, with a triangle in the top left corner (the "pl

  • Oracle Update Problem

    Hi, I have updated my Oracle 10g (running on Windows XP) from version 10.2.0.1 to 10.2.0.3 and now I am trying to execute the patch: 6430171that solves several bugs. The problem is that when I run the Opatch application I get the following error: Mic

  • F10 Key not working in Web Browser mode

    I created a click box on a CP5 screen and assigned F10 as the Shortcut key and the action is "Go to the next slide."  When the user presses F10 the demo would advance to the next screen. This works great in preview mode.  However, when in Web Browser

  • Delivery reminders / Alerts

    Hi guys is it possible to set up an alert or notification to a user when the delivery date on a sales order arrives? ie sales order put on today has delivery date of next week, then when that date arrives the user is reminded to turn into a delivery

  • Reactive subscription was not working

    yesterday my reactivate of subscription was not working. and once I subscribe another one month call, the previous 3 month subscription is activated. which is rubbish. why there is no control to recurring subscription by manual. because this results