This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language='javascript' runat='server'> | |
Platform.Load('Core', '1'); | |
// Arrays of allowed values for both Sender Address and Sender Origin | |
// Sender Address is the from address when you send an email, make sure your expected from address is included in the list | |
// Sender Origin represents the domain originating the request | |
// The Marketing Cloud origin is in place to allow testing in Subscriber Preview, update that value to match your stack | |
var isAllowed = { | |
senderAddress:[ | |
'[email protected]' // add 'from' addresses here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language='javascript' runat='server'> | |
Platform.Load('Core', '1'); | |
// Arrays of allowed values for both Sender Address and Sender Origin | |
// Sender Address is the from address when you send an email, make sure your expected from address is included in the list | |
// Sender Origin represents the domain originating the request | |
// The Marketing Cloud origin is in place to allow testing in Subscriber Preview, update that value to match your stack | |
var isAllowed = { | |
senderAddress:[ | |
'[email protected]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- {{={< >}=}} --> | |
<!doctype html> | |
<html ⚡4email data-css-strict> | |
<head> | |
<meta charset="utf-8"> | |
<script async src="https://cdn.ampproject.org/v0.js"></script> | |
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script> | |
<script async custom-element="amp-list" src="https://cdn.ampproject.org/v0/amp-list-0.1.js"></script> | |
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script> | |
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language="javascript" runat="server"> | |
// Author: Eliot Harper <[email protected]> | |
// Revision date: January 31, 2021 | |
// DISCLAIMER | |
// While due care has been taken in the preparation of this | |
// supplied code example, no liability is assumed for incidental | |
// or consequential damages in connection with or arising out its | |
// use. Example code is provided on an "as is" basis and no | |
// expressed or implied warranty of any kind is made for the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language="javascript" runat="server"> | |
Platform.Load("core","1.1.5"); | |
// Author: Eliot Harper <[email protected]> | |
// Revision date: October 24, 2019 | |
// DISCLAIMER | |
// While due care has been taken in the preparation of this | |
// supplied code example, no liability is assumed for incidental | |
// or consequential damages in connection with or arising out its |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat=server> | |
var city = Platform.Request.GetFormField('city'); | |
var email = Platform.Request.GetFormField('email'); | |
// Detect form submission | |
if ( (city) && (email) ) { | |
var weather = getWeather(city); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat=server> | |
var apiKey = 'INSERT_WEATHERSTACK_API_KEY_HERE'; | |
var city = Platform.Request.GetQueryStringParameter('city'); | |
if (city) { | |
var url = 'http://api.weatherstack.com/forecast?access_key=' + apiKey + '&query=' + city; | |
var weather = Platform.Function.HTTPGet(url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat=server> | |
Platform.Load("core", "1"); | |
// create DE | |
var timeStamp = Math.round((new Date()).getTime() / 1000); | |
var deKey = "BACKUP_" + timeStamp; | |
var deName = "Backup DE " + timeStamp; | |
var obj = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Use the following cURL command to execute this request: | |
curl -XPOST -H "Content-type: text/xml; charset=utf-8" -H "SOAPAction: Update" -d @request.xml https://webservice.s7.exacttarget.com/Service.asmx | |
Replace 's7' with your SOAP endpoint as required | |
--> | |
<?xml version="1.0" encoding="utf-8"?> | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<soapenv:Header> | |
<fueloauth xmlns="http://exacttarget.com">insertAccessTokenHere</fueloauth> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ref": "refs/heads/master", | |
"before": "c590fa60a37627f6d07fc74cfb44758752963e7a", | |
"after": "4a372650814b0c191dc10064830e5e4e5cbf3130", | |
"created": false, | |
"deleted": false, | |
"forced": false, | |
"base_ref": null, | |
"compare": "https://github.com/eliotharper/ampscript-guide-build/compare/c590fa60a376...4a372650814b", | |
"commits": [ |
NewerOlder