#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2009
    Posts
    7
    Rep Power
    0

    ASPEmail- Can I pass parameters using AppendBodyFromFile


    I have an application where I need to email an order confirmation to the customer. I use Persits ASPMail for basic emails and in this case, I want to use the # AppendBodyFromFile method to send my standard Order Confirmation. It is an ASP form with VB script that connects to an SQL Server 2008 table to pull the order info.

    Problem is, I need to pass the parameters of Customer Number and Order Number to the Order Confirmation. I can't use session variables to pass the info since the email is no longer associated with this session. So, I thought I would do so via URL Parameters such as:

    strBodyPath = Server.MapPath(".") & "\Order_Confirmation.asp"
    ?Login_Contact_ID=" & Customer_Contact_ID _
    & "&client_id=" & client_id _
    & "&role=" & role _
    & "&current_emailer=" & allocation_code

    Mail.AppendBodyFromFile strBodyPath
    Mail.Send ' send message

    However, it seems like you are not allowed to pass params in ASPMail. Since there are thousands of applications that are emailing order confirmations, there must be a method to passing along necessary info to the email form but I am at a loss how to do so. Please help.

    Regards,
    Steve
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    I've never used persits, but they have support that could probably help you out.

    Why don't you just build the message body with the request variables inserted in the string?
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2009
    Posts
    7
    Rep Power
    0
    Originally Posted by Doug G
    I've never used persits, but they have support that could probably help you out.

    Why don't you just build the message body with the request variables inserted in the string?
    Doug,

    Thanks for the response. I think you are on the right track. I can't use static text, it needs to be it's own form but like you mentioned, I can insert the info into the source code.

    Thanks for taking the time to answer the question, you are always a great help.

    Regards,
    Steve

IMN logo majestic logo threadwatch logo seochat tools logo