0 Replies Latest reply on Sep 2, 2014 1:48 PM by Gemma

    Referencing bind variables that include non alpha characters

    Gemma

      I wonder if anyone can share any insight.  I have defined a resource handler that accepts a request type of POST.  It is called by our mail service (mailgun) when an email is undeliverable.  Here is the post request when using RequestBin:

       

      FORM/POST PARAMETERS

      domain: cavantimail.com

      recipient: alice@example.com

      my-var-2: awesome

      X-Mailgun-Sid: WyIwNzI5MCIsICJhbGljZUBleGFtcGxlLmNvbSIsICI2Il0=

      timestamp: 1409604015

      Message-Id: <20130503182626.18666.16540@cavanti.com>

      body-plain:

      my_var_1: Mailgun Variable #1

      attachment-count: 1

      code: 550

      message-headers: [["Received", "by luna.mailgun.net with SMTP mgrt 8734663311733; Fri, 03 May 2013 18:26:27 +0000"], ["Content-Type", ["multipart/alternative", {"boundary": "eb663d73ae0a4d6c9153cc0aec8b7520"}]], ["Mime-Version", "1.0"], ["Subject", "Test bounces webhook"], ["From", "Bob <bob@cavantimail.com>"], ["To", "Alice <alice@example.com>"], ["Message-Id", "<20130503182626.18666.16540@cavanti.com>"], ["List-Unsubscribe", "<mailto:u+na6tmy3ege4tgnldmyytqojqmfsdembyme3tmy3cha4wcndbgaydqyrgoi6wszdpovrhi5dinfzw63tfmv4gs43uomstimdhnvqws3bomnxw2jtuhusteqjgmq6tm@cavanti.com>"], ["X-Mailgun-Sid", "WyIwNzI5MCIsICJhbGljZUBleGFtcGxlLmNvbSIsICI2Il0="], ["X-Mailgun-Variables", "{\"my_var_1\": \"Mailgun Variable #1\", \"my-var-2\": \"awesome\"}"], ["Date", "Fri, 03 May 2013 18:26:27 +0000"], ["Sender", "bob@cavantimail.com"]]

      event: bounced

      token: cc8861b375cad9c7bbbe548de50de1a89f16d66f436d97677e

      error: 5.1.1 The email account that you tried to reach does not exist. Please try 5.1.1 double-checking the recipient's email address for typos or 5.1.1 unnecessary spaces. Learn more at 5.1.1 http://support.example.com/mail/bin/answer.py

      signature:3ca3b3664ffc0e37c3c0c4ab9830fb098c5019e8d725b4d56c75e7218c898b0b

       

      HEADERS

      Via: 1.1 vegur

      Connect-Time: 0

      Accept-Encoding: gzip

      User-Agent: mailgun/treq-0.2.1

      Content-Length: 4170

      X-Request-Id: 6b73b10b-7497-4f78-8317-c0c915cc4916

      Connection: close

      Content-Type: multipart/form-data; boundary=71403782-78e8-48e2-af1c-104eff4aed63

      Host: requestb.in

      Total-Route-Time: 0

       

      I can reference the simple post parameters such as error, receipient using the normal bind variable syntax :error, :recipient without a problem.  However, I need to reference the content of message-headers (sender to be precise).  If I reference message-headers as a bind variable as :message-headers, error Error during evaluation of resource template: POST mailgun/undeliverable_mail/, SQL Error Code: 6,550, SQL Error Message: ORA-06550: line 4, column 37: PLS-00201: identifier 'HEADERS' must be declared ORA-06550: line 4, column 1: PL/SQL: Statement ignored  is raised.

       

      Does anyone have any insight as to how I can reference message-headers and its content (I seem to recall that '-' is not legal syntax for a bind variable, but I'm not 100% sure on that).

       

      Thanks for any help anyone can give.

       

      Gemma