sending via http request

Topics in this area:

overview

script address, mandatory parameters, hidden and non-hidden fields

details

not required / optional parameters, hidden and non-hidden fields

web form example

simple html web form example

sms to http example

sms forwarding to http configuration example using Teltonika routers

Subsections of sending via http request

overview

RealSender lets you easily submit http requests, such as web forms contents, via email messages.
In this way you can receive the results of your feedback forms directly in your mailbox.

There’s no need of any special configuration on your side.
The forms can be published in any html webpage or added directly within your email messages.


Script address:
<form action="https://rsXXX.realsender.com/script/form.pl" method="post" accept-charset="utf-8">


Required/mandatory parameters (hidden fields):

Parameter
Description
recipient the email address or the “alias” to which the form submission will be sent
for security reasons, the “real” address should be configured at sever level
required this is a list of fields that the user must fill in before they submit the form
we suggest to check the “email” field only (content and syntax are verified)
additional checks are usually done via javascript, we can provide examples
redirect the user will be redirected to this URL after a successful form submission
missing_fields_redirect the user will be redirected here if any of the ‘required’ fields are left blank

Required/mandatory parameters (non-hidden fields):

Parameter
Description
email it will become the sender’s email address of the message
if the email address
is correct
the data will be sent to the configured recipient
the user will be redirected to the “redirect” URL
if the email address
is missing or syntatically wrong
no mail will be sent
the user will be redirected to the “missing_fields_redirect” URL

HTTP REQUEST details

details

Not required/optional parameters (hidden fields):

Parameter
Description
subject the subject line for the email
env_report a list of the user’s environment variables that should be included in the email
useful for recording things like the IP address of the user, example:
value=“REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT”
print_blank_fields if this is set to “1” then fields left blank will be included in the email

Not required/optional parameters (non-hidden fields):

Parameter
Description
realname the user’s full name, it will become part of the sender’s email address
any_other_field you can add as many fields you need, no setup is required at server level

The encoding that will be used for the form submission is the UTF-8 international charset.
To test it, add “€uro” in any of your fields, submit the form and check the email message you’ll receive.


WEB FORM example

web form example

This is a simple html web form example
with two optional parameters: “realname” and “notes”

<form action="https://rsXXX.realsender.com/script/form.pl" method="post" accept-charset="utf-8">
    <input type="hidden" name="recipient" value="email_address-or-alias" />
    <input type="hidden" name="required" value="email" />
    <input type="hidden" name="redirect" value="/form/thankyou.html" />
    <input type="hidden" name="missing_fields_redirect" value="/form/error.html" />
        Name:<br />
        <input name="realname" /><br />
        Email:<br />
        <input name="email" /><br />
        Notes:<br />
        <textarea cols="40" rows="2" name="notes"></textarea><br />
        <input type="submit" />
</form>

The “redirect” and “missing_fields_redirect” landing pages can reside on your server.
You can add as many fields you need, no setup is required at server level.


SMS to HTTP example

sms to http example

To receive SMS messages directly in your mailbox
Teltonika routers offer the “SMS Forwarding To HTTP Configuration” option.

You can find it within the Teltonika WebUI: Services > Mobile Utilities > SMS Gateway.
!! The recipient’s domain (yourdomain.com) must be pre-authorized by RealSender !!

Number value name: email

Method: Post
URL:    https://rsXXX.realsender.com/script/sms.pl

Message value name: message
Extra data pair 1:  recipient | name@yourdomain.com
Extra data pair 2:  subject   | Text-Message

SMS Forwarding To HTTP Configuration


Option 1 - using MOBILE DATA

!! A 4G (LTE) connection is required to work properly with RealSender !!
You can setup it up inside Teltonika WebUI: Network > Mobile > SIM card settings

Network type: 4G (LTE) only

Mobile SIM card settings 4G (LTE) only


Option 2 - using LAN GATEWAY DATA

You can set the internet gateway to go through your LAN.
Teltonika WebUI: Network > LAN > NETWORK INTERFACES > [edit]

Network interfaces - LAN

Just configure the IPv4 gateway and the DNS servers
see the example below (modify it with your own parameters):

INTERFACES: LAN 
...
IPv4 gateway: 192.168.1.1
DNS servers:  8.8.8.8     !! mandatory !!

The Mobile Data Connection can be disabled in a few ways, see: Disable Mobile Data.
When mobile data is disabled, SMS messaging remains operational.

The easiest way to Disable Mobile Data, is to TEXT to the mobile number: <router_password> mobileoff
You can check the changes in the same way, using the “status” command: <router_password> status


Example of email message received
Subject: Text-Message (+41790000000)

Below is the received text message.  It was submitted by
 (+41790000000) on Monday, June 26, 2023 at 08:31:29 CEST
---------------------------------------------------------------------------

Test Message

---------------------------------------------------------------------------