Anyone use Sparkpost with Lasso?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyone use Sparkpost with Lasso?

Stephen Smiroldo-4
Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past few years but now moving to Sparkpost and having some trouble figuring out how the MIME Headers should be sent. Below is some simplified sample code. This worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”) coming through.

local: 'sparkpost_specific'= (array: 'campaign_id'='test123_Campaign');
var: 'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);

Email_Send:
-immediate,
-host = 'smtp.sparkpostmail.com',
-username = $sp_un,
-password = $sp_ps,
-port = 587,
-to=$email,
-From=$from,
-HTML=$body_content,
-Subject=$subject,
-ExtraMIMEHeaders=$MIME_Headers;


Thanks,

Stephen
StudioThought, LLC
www.studiothought.com


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

jasonhuck
The -ExtraMIMEHeaders param accepts an array of pairs, whereas your code
uses a map...

- jason





On Tue, Jun 21, 2016 at 1:07 PM, Stephen Smiroldo <[hidden email]
> wrote:

> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past few
> years but now moving to Sparkpost and having some trouble figuring out how
> the MIME Headers should be sent. Below is some simplified sample code. This
> worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”)
> coming through.
>
> local: 'sparkpost_specific'= (array:    'campaign_id'='test123_Campaign');
> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
>
> Email_Send:
> -immediate,
> -host = 'smtp.sparkpostmail.com',
> -username = $sp_un,
> -password = $sp_ps,
> -port = 587,
> -to=$email,
> -From=$from,
> -HTML=$body_content,
> -Subject=$subject,
> -ExtraMIMEHeaders=$MIME_Headers;
>
>
> Thanks,
>
> Stephen
> StudioThought, LLC
> www.studiothought.com
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

Laurent Gigon
In reply to this post by Stephen Smiroldo-4
It's more efficient to use Sparkpost API.
Le 21 juin 2016 1:08 PM, "Stephen Smiroldo" <[hidden email]> a
écrit :

> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past few
> years but now moving to Sparkpost and having some trouble figuring out how
> the MIME Headers should be sent. Below is some simplified sample code. This
> worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”)
> coming through.
>
> local: 'sparkpost_specific'= (array:    'campaign_id'='test123_Campaign');
> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
>
> Email_Send:
> -immediate,
> -host = 'smtp.sparkpostmail.com',
> -username = $sp_un,
> -password = $sp_ps,
> -port = 587,
> -to=$email,
> -From=$from,
> -HTML=$body_content,
> -Subject=$subject,
> -ExtraMIMEHeaders=$MIME_Headers;
>
>
> Thanks,
>
> Stephen
> StudioThought, LLC
> www.studiothought.com
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

Stephen Smiroldo-4
Yep… Trying to do a super crash course but the documentation seems to be geared toward quasi-experts in SparkPost already. Have any example API calls in Lasso (for sending email) you can provide?



> On Jun 21, 2016, at 1:36 PM, Laurent G <[hidden email]> wrote:
>
> It's more efficient to use Sparkpost API.
> Le 21 juin 2016 1:08 PM, "Stephen Smiroldo" <[hidden email]> a
> écrit :
>
>> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past few
>> years but now moving to Sparkpost and having some trouble figuring out how
>> the MIME Headers should be sent. Below is some simplified sample code. This
>> worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”)
>> coming through.
>>
>> local: 'sparkpost_specific'= (array:    'campaign_id'='test123_Campaign');
>> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
>>
>> Email_Send:
>> -immediate,
>> -host = 'smtp.sparkpostmail.com',
>> -username = $sp_un,
>> -password = $sp_ps,
>> -port = 587,
>> -to=$email,
>> -From=$from,
>> -HTML=$body_content,
>> -Subject=$subject,
>> -ExtraMIMEHeaders=$MIME_Headers;
>>
>>
>> Thanks,
>>
>> Stephen
>> StudioThought, LLC
>> www.studiothought.com
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

Stephen Smiroldo-4
In reply to this post by jasonhuck
Thanks Jason, I was actually using arrays but tried different things to see what happened and copied that in my email to the list. How would you structure the code below to make it work with the #sparkpost_secific MIME content in with the other MIME content. Below is the full MIME parameters/values:


local: 'sparkpost_specific'= (array: 'campaign_id'='test123_Campaign');
var: 'MIME_Headers' = (array: 'MIME-Version'='1.0',
                                'Content-Type'='text/html; charset=UTF-8',
                                'Content-Transfer-Encoding'='8bit',
                                'X-Priority'='3',
                                'X-MSYS-API'=#sparkpost_specific);

Email_Send:
-immediate,
-host = 'smtp.sparkpostmail.com',
-username = $sp_un,
-password = $sp_ps,
-port = 587,
-to=$email,
-From=$from,
-HTML=$body_content,
-Subject=$subject,
-ExtraMIMEHeaders=$MIME_Headers;





> On Jun 21, 2016, at 1:23 PM, Jason Huck <[hidden email]> wrote:
>
> The -ExtraMIMEHeaders param accepts an array of pairs, whereas your code
> uses a map...
>
> - jason
>
>
>
>
>
> On Tue, Jun 21, 2016 at 1:07 PM, Stephen Smiroldo <[hidden email]
>> wrote:
>
>> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past few
>> years but now moving to Sparkpost and having some trouble figuring out how
>> the MIME Headers should be sent. Below is some simplified sample code. This
>> worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”)
>> coming through.
>>
>> local: 'sparkpost_specific'= (array:    'campaign_id'='test123_Campaign');
>> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
>>
>> Email_Send:
>> -immediate,
>> -host = 'smtp.sparkpostmail.com',
>> -username = $sp_un,
>> -password = $sp_ps,
>> -port = 587,
>> -to=$email,
>> -From=$from,
>> -HTML=$body_content,
>> -Subject=$subject,
>> -ExtraMIMEHeaders=$MIME_Headers;
>>
>>
>> Thanks,
>>
>> Stephen
>> StudioThought, LLC
>> www.studiothought.com
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

jasonhuck
I don't know anything about SparkPost, but a quick perusal of their API
docs turned up this page:

https://developers.sparkpost.com/api/smtp-api.html

It looks to me as if you need to encode all of your parameters as a JSON
object and then send that as the value of the X-MYSYS-API header, something
like:

var('headers') = array( ... content type, etc...., 'X-MYSYS-API' =
encode_json(map('campaign_id' = 'test123')));

- jason




On Tue, Jun 21, 2016 at 2:06 PM, Stephen Smiroldo <[hidden email]
> wrote:

> Thanks Jason, I was actually using arrays but tried different things to
> see what happened and copied that in my email to the list. How would you
> structure the code below to make it work with the #sparkpost_secific MIME
> content in with the other MIME content. Below is the full MIME
> parameters/values:
>
>
> local:  'sparkpost_specific'= (array:   'campaign_id'='test123_Campaign');
> var:            'MIME_Headers' = (array: 'MIME-Version'='1.0',
>                                 'Content-Type'='text/html; charset=UTF-8',
>                                 'Content-Transfer-Encoding'='8bit',
>                                 'X-Priority'='3',
>                                 'X-MSYS-API'=#sparkpost_specific);
>
> Email_Send:
> -immediate,
> -host = 'smtp.sparkpostmail.com',
> -username = $sp_un,
> -password = $sp_ps,
> -port = 587,
> -to=$email,
> -From=$from,
> -HTML=$body_content,
> -Subject=$subject,
> -ExtraMIMEHeaders=$MIME_Headers;
>
>
>
>
>
> > On Jun 21, 2016, at 1:23 PM, Jason Huck <[hidden email]> wrote:
> >
> > The -ExtraMIMEHeaders param accepts an array of pairs, whereas your code
> > uses a map...
> >
> > - jason
> >
> >
> >
> >
> >
> > On Tue, Jun 21, 2016 at 1:07 PM, Stephen Smiroldo <
> [hidden email]
> >> wrote:
> >
> >> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past
> few
> >> years but now moving to Sparkpost and having some trouble figuring out
> how
> >> the MIME Headers should be sent. Below is some simplified sample code.
> This
> >> worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”)
> >> coming through.
> >>
> >> local: 'sparkpost_specific'= (array:
> 'campaign_id'='test123_Campaign');
> >> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
> >>
> >> Email_Send:
> >> -immediate,
> >> -host = 'smtp.sparkpostmail.com',
> >> -username = $sp_un,
> >> -password = $sp_ps,
> >> -port = 587,
> >> -to=$email,
> >> -From=$from,
> >> -HTML=$body_content,
> >> -Subject=$subject,
> >> -ExtraMIMEHeaders=$MIME_Headers;
> >>
> >>
> >> Thanks,
> >>
> >> Stephen
> >> StudioThought, LLC
> >> www.studiothought.com
> >>
> >>
> >> #############################################################
> >>
> >> This message is sent to you because you are subscribed to
> >>  the mailing list Lasso [hidden email]
> >> Official list archives available at http://www.lassotalk.com
> >> To unsubscribe, E-mail to: <[hidden email]>
> >> Send administrative queries to  <[hidden email]>
> >
> > #############################################################
> >
> > This message is sent to you because you are subscribed to
> >  the mailing list Lasso [hidden email]
> > Official list archives available at http://www.lassotalk.com
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

Laurent Gigon
In reply to this post by Stephen Smiroldo-4
Yes, as soon as I get home :)
Le 21 juin 2016 1:53 PM, "Stephen Smiroldo" <[hidden email]> a
écrit :

> Yep… Trying to do a super crash course but the documentation seems to be
> geared toward quasi-experts in SparkPost already. Have any example API
> calls in Lasso (for sending email) you can provide?
>
>
>
> > On Jun 21, 2016, at 1:36 PM, Laurent G <[hidden email]> wrote:
> >
> > It's more efficient to use Sparkpost API.
> > Le 21 juin 2016 1:08 PM, "Stephen Smiroldo" <[hidden email]>
> a
> > écrit :
> >
> >> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past
> few
> >> years but now moving to Sparkpost and having some trouble figuring out
> how
> >> the MIME Headers should be sent. Below is some simplified sample code.
> This
> >> worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”)
> >> coming through.
> >>
> >> local: 'sparkpost_specific'= (array:
> 'campaign_id'='test123_Campaign');
> >> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
> >>
> >> Email_Send:
> >> -immediate,
> >> -host = 'smtp.sparkpostmail.com',
> >> -username = $sp_un,
> >> -password = $sp_ps,
> >> -port = 587,
> >> -to=$email,
> >> -From=$from,
> >> -HTML=$body_content,
> >> -Subject=$subject,
> >> -ExtraMIMEHeaders=$MIME_Headers;
> >>
> >>
> >> Thanks,
> >>
> >> Stephen
> >> StudioThought, LLC
> >> www.studiothought.com
> >>
> >>
> >> #############################################################
> >>
> >> This message is sent to you because you are subscribed to
> >>  the mailing list Lasso [hidden email]
> >> Official list archives available at http://www.lassotalk.com
> >> To unsubscribe, E-mail to: <[hidden email]>
> >> Send administrative queries to  <[hidden email]>
> >
> > #############################################################
> >
> > This message is sent to you because you are subscribed to
> >  the mailing list Lasso [hidden email]
> > Official list archives available at http://www.lassotalk.com
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

stevepiercy
In reply to this post by Stephen Smiroldo-4
Use os_process, optionally with shell, to call curl from the
command line.

My article on Rackspace Cloud Files describes how to do this and
provides example source code you could reuse to create your own
Lasso type that invokes curl.
http://www.stevepiercy.com/articles/rackspace_cloud-lasso-sdk-for-the-rackspace-cloud-files-api/

--steve


On 6/21/16 at 1:53 PM, [hidden email] (Stephen
Smiroldo) pronounced:

>Yep… Trying to do a super crash course but the documentation
>seems to be geared toward quasi-experts in SparkPost already.
>Have any example API calls in Lasso (for sending email) you can provide?
>
>
>
>>On Jun 21, 2016, at 1:36 PM, Laurent G <[hidden email]> wrote:
>>
>>It's more efficient to use Sparkpost API.
>>Le 21 juin 2016 1:08 PM, "Stephen Smiroldo" <[hidden email]> a
>>écrit :
>>
>>> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past few
>>> years but now moving to Sparkpost and having some trouble figuring out how
>>> the MIME Headers should be sent. Below is some simplified sample code. This
>>> worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”)
>>> coming through.
>>>   local: 'sparkpost_specific'= (array:    'campaign_id'='test123_Campaign');
>>> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
>>>   Email_Send:
>>> -immediate,
>>> -host = 'smtp.sparkpostmail.com',
>>> -username = $sp_un,
>>> -password = $sp_ps,
>>> -port = 587,
>>> -to=$email,
>>> -From=$from,
>>> -HTML=$body_content,
>>> -Subject=$subject,
>>> -ExtraMIMEHeaders=$MIME_Headers;
>>>    Thanks,
>>>   Stephen
>>> StudioThought, LLC
>>> www.studiothought.com
>>>    #############################################################
>>>   This message is sent to you because you are subscribed to
>>>  the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>#############################################################
>>
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso [hidden email]
>>Official list archives available at http://www.lassotalk.com
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Soquel, CA
<[hidden email]>               <http://www.stevepiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

Laurent Gigon
In reply to this post by Stephen Smiroldo-4
Here is the script I created, it works just fine for me, let me know
if you have some problems :

<?Lassoscript

var('SP_from')='';
var('SP_reply_to')= '';
var('SP_subject')='';
var('sp_recipient_address')='';
var('SP_html_text')='html';
var('SP_body')='';

var('sparkpost_api_key')='YOUR_API_KEY';

var('SP_subject')=String_ReplaceRegExp(var('SP_subject'), -Find='"',
-Replace='\'');
var('SP_subject')=String_ReplaceRegExp(var('SP_subject'), -Find='\r',
-Replace=' ');
var('SP_body')=String_ReplaceRegExp(var('SP_body'), -Find='"', -Replace='\'');

var('envoi')=Include_URL('https://api.sparkpost.com/api/v1/transmissions',
-SendMIMEHeaders=Array('Authorization'=var('sparkpost_api_key'),'Content-Type'='application/json'),
-POSTParams='{
    "content": {
      "from": "'+ var('SP_from')+ '",
     "reply_to":"'+ var('SP_reply_to')+ '",
      "subject": "'+ var('SP_subject') + '",
      "'+var('SP_html_text')+'": "'+var('SP_body')+'"
    },
    "recipients": [{ "address": "' + var('sp_recipient_address') + '" }]
  }');

var('sp_result')=var('envoi');

?>

Laurent


2016-06-21 13:07 GMT-04:00 Stephen Smiroldo <[hidden email]>:

> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past few years but now moving to Sparkpost and having some trouble figuring out how the MIME Headers should be sent. Below is some simplified sample code. This worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”) coming through.
>
> local: 'sparkpost_specific'= (array:    'campaign_id'='test123_Campaign');
> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
>
> Email_Send:
> -immediate,
> -host = 'smtp.sparkpostmail.com',
> -username = $sp_un,
> -password = $sp_ps,
> -port = 587,
> -to=$email,
> -From=$from,
> -HTML=$body_content,
> -Subject=$subject,
> -ExtraMIMEHeaders=$MIME_Headers;
>
>
> Thanks,
>
> Stephen
> StudioThought, LLC
> www.studiothought.com
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

Stephen Smiroldo-4
Thanks Laurent!

To get it to send a test message, all I had to add was the “headers” part within the “content” section. So, my post looks like this:

var('envoi')=Include_URL('https://api.sparkpost.com/api/v1/transmissions',
-SendMIMEHeaders=Array('Authorization'=var('sparkpost_api_key'),'Content-Type'='application/json'),
-POSTParams='{
        "campaign_id": "'+#campaign_id+'",
        "options": {
            "open_tracking": true,
            "click_tracking": true
          },
        "content": {
                "from": "'+ var('SP_from')+ '",
                "headers": {
                  "X-Customer-Campaign-ID": "'+#campaign_id+'"
                  },
            "reply_to":"'+ var('SP_reply_to')+ '",
            "subject": "'+ var('SP_subject') + '",
            "'+var('SP_html_text')+'": "'+var('SP_body')+'"
   },
   "recipients": [{ "address": "' + var('sp_recipient_address') + '" }]
 }');



> On Jun 22, 2016, at 10:34 AM, Laurent G <[hidden email]> wrote:
>
> Here is the script I created, it works just fine for me, let me know
> if you have some problems :
>
> <?Lassoscript
>
> var('SP_from')='';
> var('SP_reply_to')= '';
> var('SP_subject')='';
> var('sp_recipient_address')='';
> var('SP_html_text')='html';
> var('SP_body')='';
>
> var('sparkpost_api_key')='YOUR_API_KEY';
>
> var('SP_subject')=String_ReplaceRegExp(var('SP_subject'), -Find='"',
> -Replace='\'');
> var('SP_subject')=String_ReplaceRegExp(var('SP_subject'), -Find='\r',
> -Replace=' ');
> var('SP_body')=String_ReplaceRegExp(var('SP_body'), -Find='"', -Replace='\'');
>
> var('envoi')=Include_URL('https://api.sparkpost.com/api/v1/transmissions',
> -SendMIMEHeaders=Array('Authorization'=var('sparkpost_api_key'),'Content-Type'='application/json'),
> -POSTParams='{
>    "content": {
>      "from": "'+ var('SP_from')+ '",
>     "reply_to":"'+ var('SP_reply_to')+ '",
>      "subject": "'+ var('SP_subject') + '",
>      "'+var('SP_html_text')+'": "'+var('SP_body')+'"
>    },
>    "recipients": [{ "address": "' + var('sp_recipient_address') + '" }]
>  }');
>
> var('sp_result')=var('envoi');
>
> ?>
>
> Laurent
>
>
> 2016-06-21 13:07 GMT-04:00 Stephen Smiroldo <[hidden email]>:
>> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past few years but now moving to Sparkpost and having some trouble figuring out how the MIME Headers should be sent. Below is some simplified sample code. This worked with Mandrill but there are no extra headers (i.e. “X-MSYS-API”) coming through.
>>
>> local: 'sparkpost_specific'= (array:    'campaign_id'='test123_Campaign');
>> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
>>
>> Email_Send:
>> -immediate,
>> -host = 'smtp.sparkpostmail.com',
>> -username = $sp_un,
>> -password = $sp_ps,
>> -port = 587,
>> -to=$email,
>> -From=$from,
>> -HTML=$body_content,
>> -Subject=$subject,
>> -ExtraMIMEHeaders=$MIME_Headers;
>>
>>
>> Thanks,
>>
>> Stephen
>> StudioThought, LLC
>> www.studiothought.com
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

Laurent Gigon
Excellent, and now you can get back bounces and complaints by using web
hook function, if you need the script I can give it to you :)

Laurent
Le 22 juin 2016 12:18 PM, "Stephen Smiroldo" <[hidden email]> a
écrit :

> Thanks Laurent!
>
> To get it to send a test message, all I had to add was the “headers” part
> within the “content” section. So, my post looks like this:
>
> var('envoi')=Include_URL('https://api.sparkpost.com/api/v1/transmissions',
>
> -SendMIMEHeaders=Array('Authorization'=var('sparkpost_api_key'),'Content-Type'='application/json'),
> -POSTParams='{
>         "campaign_id": "'+#campaign_id+'",
>         "options": {
>             "open_tracking": true,
>             "click_tracking": true
>           },
>         "content": {
>                 "from": "'+ var('SP_from')+ '",
>                 "headers": {
>                   "X-Customer-Campaign-ID": "'+#campaign_id+'"
>                   },
>             "reply_to":"'+ var('SP_reply_to')+ '",
>             "subject": "'+ var('SP_subject') + '",
>             "'+var('SP_html_text')+'": "'+var('SP_body')+'"
>    },
>    "recipients": [{ "address": "' + var('sp_recipient_address') + '" }]
>  }');
>
>
>
> > On Jun 22, 2016, at 10:34 AM, Laurent G <[hidden email]> wrote:
> >
> > Here is the script I created, it works just fine for me, let me know
> > if you have some problems :
> >
> > <?Lassoscript
> >
> > var('SP_from')='';
> > var('SP_reply_to')= '';
> > var('SP_subject')='';
> > var('sp_recipient_address')='';
> > var('SP_html_text')='html';
> > var('SP_body')='';
> >
> > var('sparkpost_api_key')='YOUR_API_KEY';
> >
> > var('SP_subject')=String_ReplaceRegExp(var('SP_subject'), -Find='"',
> > -Replace='\'');
> > var('SP_subject')=String_ReplaceRegExp(var('SP_subject'), -Find='\r',
> > -Replace=' ');
> > var('SP_body')=String_ReplaceRegExp(var('SP_body'), -Find='"',
> -Replace='\'');
> >
> > var('envoi')=Include_URL('https://api.sparkpost.com/api/v1/transmissions
> ',
> >
> -SendMIMEHeaders=Array('Authorization'=var('sparkpost_api_key'),'Content-Type'='application/json'),
> > -POSTParams='{
> >    "content": {
> >      "from": "'+ var('SP_from')+ '",
> >     "reply_to":"'+ var('SP_reply_to')+ '",
> >      "subject": "'+ var('SP_subject') + '",
> >      "'+var('SP_html_text')+'": "'+var('SP_body')+'"
> >    },
> >    "recipients": [{ "address": "' + var('sp_recipient_address') + '" }]
> >  }');
> >
> > var('sp_result')=var('envoi');
> >
> > ?>
> >
> > Laurent
> >
> >
> > 2016-06-21 13:07 GMT-04:00 Stephen Smiroldo <[hidden email]>:
> >> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past
> few years but now moving to Sparkpost and having some trouble figuring out
> how the MIME Headers should be sent. Below is some simplified sample code.
> This worked with Mandrill but there are no extra headers (i.e.
> “X-MSYS-API”) coming through.
> >>
> >> local: 'sparkpost_specific'= (array:
> 'campaign_id'='test123_Campaign');
> >> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
> >>
> >> Email_Send:
> >> -immediate,
> >> -host = 'smtp.sparkpostmail.com',
> >> -username = $sp_un,
> >> -password = $sp_ps,
> >> -port = 587,
> >> -to=$email,
> >> -From=$from,
> >> -HTML=$body_content,
> >> -Subject=$subject,
> >> -ExtraMIMEHeaders=$MIME_Headers;
> >>
> >>
> >> Thanks,
> >>
> >> Stephen
> >> StudioThought, LLC
> >> www.studiothought.com
> >>
> >>
> >> #############################################################
> >>
> >> This message is sent to you because you are subscribed to
> >>  the mailing list Lasso [hidden email]
> >> Official list archives available at http://www.lassotalk.com
> >> To unsubscribe, E-mail to: <[hidden email]>
> >> Send administrative queries to  <[hidden email]>
> >
> > #############################################################
> >
> > This message is sent to you because you are subscribed to
> >  the mailing list Lasso [hidden email]
> > Official list archives available at http://www.lassotalk.com
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Anyone use Sparkpost with Lasso?

Stephen Smiroldo-4
Yeah, I had actually coded the webhook part before the email send. ;-)  I was using webhooks with Mandrill and the transition was pretty similar.

I ran a test of about 15,000 emails today after integrating the Sparkpost transmission API into our bulk email tool and wow! Probably a few thousand times faster than SMTP.

Thanks again for your help!

Stephen


> On Jun 22, 2016, at 4:53 PM, Laurent G <[hidden email]> wrote:
>
> Excellent, and now you can get back bounces and complaints by using web
> hook function, if you need the script I can give it to you :)
>
> Laurent
> Le 22 juin 2016 12:18 PM, "Stephen Smiroldo" <[hidden email]> a
> écrit :
>
>> Thanks Laurent!
>>
>> To get it to send a test message, all I had to add was the “headers” part
>> within the “content” section. So, my post looks like this:
>>
>> var('envoi')=Include_URL('https://api.sparkpost.com/api/v1/transmissions',
>>
>> -SendMIMEHeaders=Array('Authorization'=var('sparkpost_api_key'),'Content-Type'='application/json'),
>> -POSTParams='{
>>        "campaign_id": "'+#campaign_id+'",
>>        "options": {
>>            "open_tracking": true,
>>            "click_tracking": true
>>          },
>>        "content": {
>>                "from": "'+ var('SP_from')+ '",
>>                "headers": {
>>                  "X-Customer-Campaign-ID": "'+#campaign_id+'"
>>                  },
>>            "reply_to":"'+ var('SP_reply_to')+ '",
>>            "subject": "'+ var('SP_subject') + '",
>>            "'+var('SP_html_text')+'": "'+var('SP_body')+'"
>>   },
>>   "recipients": [{ "address": "' + var('sp_recipient_address') + '" }]
>> }');
>>
>>
>>
>>> On Jun 22, 2016, at 10:34 AM, Laurent G <[hidden email]> wrote:
>>>
>>> Here is the script I created, it works just fine for me, let me know
>>> if you have some problems :
>>>
>>> <?Lassoscript
>>>
>>> var('SP_from')='';
>>> var('SP_reply_to')= '';
>>> var('SP_subject')='';
>>> var('sp_recipient_address')='';
>>> var('SP_html_text')='html';
>>> var('SP_body')='';
>>>
>>> var('sparkpost_api_key')='YOUR_API_KEY';
>>>
>>> var('SP_subject')=String_ReplaceRegExp(var('SP_subject'), -Find='"',
>>> -Replace='\'');
>>> var('SP_subject')=String_ReplaceRegExp(var('SP_subject'), -Find='\r',
>>> -Replace=' ');
>>> var('SP_body')=String_ReplaceRegExp(var('SP_body'), -Find='"',
>> -Replace='\'');
>>>
>>> var('envoi')=Include_URL('https://api.sparkpost.com/api/v1/transmissions
>> ',
>>>
>> -SendMIMEHeaders=Array('Authorization'=var('sparkpost_api_key'),'Content-Type'='application/json'),
>>> -POSTParams='{
>>>   "content": {
>>>     "from": "'+ var('SP_from')+ '",
>>>    "reply_to":"'+ var('SP_reply_to')+ '",
>>>     "subject": "'+ var('SP_subject') + '",
>>>     "'+var('SP_html_text')+'": "'+var('SP_body')+'"
>>>   },
>>>   "recipients": [{ "address": "' + var('sp_recipient_address') + '" }]
>>> }');
>>>
>>> var('sp_result')=var('envoi');
>>>
>>> ?>
>>>
>>> Laurent
>>>
>>>
>>> 2016-06-21 13:07 GMT-04:00 Stephen Smiroldo <[hidden email]>:
>>>> Has anyone used Lasso with Sparkpost? I’ve used Mandrill for the past
>> few years but now moving to Sparkpost and having some trouble figuring out
>> how the MIME Headers should be sent. Below is some simplified sample code.
>> This worked with Mandrill but there are no extra headers (i.e.
>> “X-MSYS-API”) coming through.
>>>>
>>>> local: 'sparkpost_specific'= (array:
>> 'campaign_id'='test123_Campaign');
>>>> var:    'MIME_Headers' = (map: 'X-MSYS-API'=#sparkpost_specific);
>>>>
>>>> Email_Send:
>>>> -immediate,
>>>> -host = 'smtp.sparkpostmail.com',
>>>> -username = $sp_un,
>>>> -password = $sp_ps,
>>>> -port = 587,
>>>> -to=$email,
>>>> -From=$from,
>>>> -HTML=$body_content,
>>>> -Subject=$subject,
>>>> -ExtraMIMEHeaders=$MIME_Headers;
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Stephen
>>>> StudioThought, LLC
>>>> www.studiothought.com
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>