BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Email Marketer Community Forum > Customization and Integration

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2011, 01:41 PM
John T (Interspire Staff) + John T (Interspire Staff) is offline
Interspire Staff
 
Join Date: Oct 2010
Location: Austin, Texas
Posts: 129
Lightbulb Script to send email with the Email Marketer API

Hi all,

I was running some tests with the PHP API in Email Marketer and I wrote this script to send an email with it. It's not set up to send an email campaign from the database but that is possible if you include the newsletter api. Just upload it to /emailmarketer/admin/temp/ to run it.
Attached Files
File Type: php api_send_email.php (1.6 KB, 247 views)
__________________
Software Engineer
http://www.interspire.com
Reply With Quote
  #2  
Old 01-31-2011, 02:14 PM
chvizdak + chvizdak is offline
Interspire Customer
 
Join Date: Sep 2009
Posts: 21
Thumbs up

Hi,

Thank you for posting this script – this is exactly what I need at the moment. I have extensively modified and repurposed ISC and IWP for past projects and I am looking at tieing into IEM for a current project.

I have a couple questions – let me preface my questions by saying that I understand that you will likely not be able to offer support for the script you posted in this thread or any information you may be able to provide in response to my questions.

If you can point me in the right direction as far as includes and functions go that would be fantastic and save me a tremendous amount of time hunting through the code.

Question #1:
Is there a function to send an email to contact list rather than an individual recipients? Is this done with an equivalent function to $Email_API->AddRecipient() for contact lists or do you query the database for a listing of all recipients in a contact list and then loop over that list with $Email_API->AddRecipient ?

Question #2:
What library do I need to require to specify a particular campaign? What functions would I use to accomplish this? If you can’t get into that level of detail – what file should I be looking at for how this is done?

Question #3:
How about adding an email to the cron queue? If you can point me to a file and some key functions for this task I would be happy to read through and figure out how I should be doing this.

Question #4:
I see in your initial post that I should place this script in /emailmarketer/admin/temp/ . Is this folder periodically purged by the application or will the script be undisturbed?

Thank you for posting your script – it has already saved me a huge amount of time.
Reply With Quote
  #3  
Old 07-19-2011, 07:49 PM
davidengler + davidengler is offline
Interspire Customer
 
Join Date: Jul 2011
Location: Los Angeles, CA
Posts: 4
Default Schedule an email to a contact list

Can you give example how to Schedule the Email Campaign to a contact list?
Reply With Quote
  #4  
Old 08-07-2011, 09:39 AM
DavidEldred
Guest
 
Posts: n/a
Default Download

Hi John,

Would love to download this script but despite being logged in I get a message saying I can't - not logged in/lack of privileges etc. Am I doing something wrong?

David

Seem to have managed to download it now, so don't know what went wrong before.

Last edited by DavidEldred; 08-07-2011 at 03:46 PM..
Reply With Quote
  #5  
Old 08-23-2011, 04:11 PM
jvertucio + jvertucio is offline
Interspire Customer
 
Join Date: Jan 2010
Posts: 10
Default

i'm still waiting on an example of how to schedule an email campaign to a contact list using the API.
Reply With Quote
  #6  
Old 08-23-2011, 04:37 PM
davidengler + davidengler is offline
Interspire Customer
 
Join Date: Jul 2011
Location: Los Angeles, CA
Posts: 4
Default The Script

I was able to create the script.

$send_details['SendStartTime'] defines the schedule time.
Attached Files
File Type: php api_send_campaign.php (2.4 KB, 210 views)
Reply With Quote
  #7  
Old 08-23-2011, 04:43 PM
jvertucio + jvertucio is offline
Interspire Customer
 
Join Date: Jan 2010
Posts: 10
Default

Well that's awesome. Thank you very much, David. Now, do you happen to know how to send to Segments instead of Lists? Because that is currently what I will need.

Last edited by jvertucio; 08-23-2011 at 04:43 PM.. Reason: (adding more appreciation)
Reply With Quote
  #8  
Old 08-23-2011, 04:47 PM
davidengler + davidengler is offline
Interspire Customer
 
Join Date: Jul 2011
Location: Los Angeles, CA
Posts: 4
Default

Haven't used segments yet
Reply With Quote
  #9  
Old 08-23-2011, 04:50 PM
jvertucio + jvertucio is offline
Interspire Customer
 
Join Date: Jan 2010
Posts: 10
Default

What you had provided is of immense help, though, so thank you very much.
Reply With Quote
  #10  
Old 08-23-2011, 04:51 PM
davidengler + davidengler is offline
Interspire Customer
 
Join Date: Jul 2011
Location: Los Angeles, CA
Posts: 4
Default

you are welcome
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump