Skip to main content
added 2390 characters in body
Source Link
HenryW
  • 121
  • 1
  • 3

Curent used function:

  function tep_mandrill_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
    
    if (SEND_EMAILS != 'true') return false;
$uri = 'https://mandrillapp.com/api/1.0/messages/send-template.json';

$postString = '{
"key": "xxxxxxxxxxx",
    "template_name": "sometemplatename",
    "template_content": [
        {
            "name": "header",
            "content": "*|HEADERSTUFF|*"
        },
        {
            "name": "main",
            "content": "*|CONTENTSTUFF|*"
        },
        {
            "name": "footer",
            "content": "*|FOOTERSTUFF|*"
        }
    ],
    "message": {
        "subject": "'.$email_subject.'",
        "from_email": "'.$from_email_adress.'",
        "from_name": "'.$from_email_name.'",
        "to": [
            {
                "email": "'.$to_email_address.'",
                "name": "'.$to_name.'"
            }
        ],
        "important": false,
        "track_opens": true,
        "merge": true,

  "merge_vars": [
            {
                "rcpt": "'.$to_email_address.'",
                "vars": [
                    {
                        "name": "HEADERSTUFF",
                        "content": "'.$email_subject.'" 
                    },
                     {
                        "name": "CONTENTSTUFF",
                        "content": "'.$email_text.'"
                    },
                     {
                        "name": "FOOTERSTUFF",
                        "content": "paulvale-foot"
                    }   
                ]
            }
        ],      
        "tags": [
            "password_forgotten"
        ]
    },
    "async": false,
    "ip_pool": "Main Pool"
}';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
curl_exec($ch);
  }

Curent used function:

  function tep_mandrill_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
    
    if (SEND_EMAILS != 'true') return false;
$uri = 'https://mandrillapp.com/api/1.0/messages/send-template.json';

$postString = '{
"key": "xxxxxxxxxxx",
    "template_name": "sometemplatename",
    "template_content": [
        {
            "name": "header",
            "content": "*|HEADERSTUFF|*"
        },
        {
            "name": "main",
            "content": "*|CONTENTSTUFF|*"
        },
        {
            "name": "footer",
            "content": "*|FOOTERSTUFF|*"
        }
    ],
    "message": {
        "subject": "'.$email_subject.'",
        "from_email": "'.$from_email_adress.'",
        "from_name": "'.$from_email_name.'",
        "to": [
            {
                "email": "'.$to_email_address.'",
                "name": "'.$to_name.'"
            }
        ],
        "important": false,
        "track_opens": true,
        "merge": true,

  "merge_vars": [
            {
                "rcpt": "'.$to_email_address.'",
                "vars": [
                    {
                        "name": "HEADERSTUFF",
                        "content": "'.$email_subject.'" 
                    },
                     {
                        "name": "CONTENTSTUFF",
                        "content": "'.$email_text.'"
                    },
                     {
                        "name": "FOOTERSTUFF",
                        "content": "paulvale-foot"
                    }   
                ]
            }
        ],      
        "tags": [
            "password_forgotten"
        ]
    },
    "async": false,
    "ip_pool": "Main Pool"
}';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
curl_exec($ch);
  }
grammar, formatting, rewrote title to be very descriptive of the problem
Source Link
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

Can Mailchimp , what are the optionsAPIs be used to send templated transaction email triggered by actions on my website?

CurrentlyI am currently playing around with Mailchimp's API's APIs, but i kind of feel lost.

Thethe documentation to me is not very clear so i decide to ask here. I will first explain Here is what iI actually want:

1-I want to have the templates i created on mailchimp, be visible on my own server.

2-I want to assign each template i made to a specific action (logged,subscribed,made order,new password) , this functionality i already tested with mandrill.But the template exist on mandrill's account.

  1. Have the templates I created on Mailchimp, be visible on my own server.
  2. Assign each template I made to a specific action (logged in,subscribed, created order, or new password). This is functionality that I already tested with Mandrill, but the template exists on mandrill's account.

If option 1 is not possible, can iI still make my own template in my own environment, and send that template out over mailchimp and/or mandrillMailchimp or Mandrill?

What is the best to do? Use mailchimps defaultShould I use Mailchimps services?

-OR -

Make it so you can control all for this or send the email directly from yourmy own server?

Thank you for any comment or answer to this.

Mailchimp , what are the options?

Currently playing around with Mailchimp's API's , but i kind of feel lost.

The documentation to me is not very clear so i decide to ask here. I will first explain what i actually want:

1-I want to have the templates i created on mailchimp, be visible on my own server.

2-I want to assign each template i made to a specific action (logged,subscribed,made order,new password) , this functionality i already tested with mandrill.But the template exist on mandrill's account.

If option 1 is not possible, can i still make my own template in my own environment, and send that template out over mailchimp and/or mandrill?

What is the best to do? Use mailchimps default services?

-OR -

Make it so you can control all from your own server?

Thank you for any comment or answer to this.

Can Mailchimp APIs be used to send templated transaction email triggered by actions on my website?

I am currently playing around with Mailchimp's APIs, but the documentation to me is not very clear. Here is what I actually want:

  1. Have the templates I created on Mailchimp, be visible on my own server.
  2. Assign each template I made to a specific action (logged in,subscribed, created order, or new password). This is functionality that I already tested with Mandrill, but the template exists on mandrill's account.

If option 1 is not possible, can I still make my own template in my own environment, and send that template out over Mailchimp or Mandrill?

Should I use Mailchimps services for this or send the email directly from my own server?

Source Link
HenryW
  • 121
  • 1
  • 3

Mailchimp , what are the options?

Currently playing around with Mailchimp's API's , but i kind of feel lost.

The documentation to me is not very clear so i decide to ask here. I will first explain what i actually want:

1-I want to have the templates i created on mailchimp, be visible on my own server.

2-I want to assign each template i made to a specific action (logged,subscribed,made order,new password) , this functionality i already tested with mandrill.But the template exist on mandrill's account.

If option 1 is not possible, can i still make my own template in my own environment, and send that template out over mailchimp and/or mandrill?

What is the best to do? Use mailchimps default services?

-OR -

Make it so you can control all from your own server?

Thank you for any comment or answer to this.