Acelle mail script

You're looking for an example script for an AcceleMail email automation tool!

AcceleMail is a powerful email automation tool that allows you to automate repetitive email tasks, such as sending personalized emails, tracking responses, and more. Here's a basic script example to get you started:

Script Name: Send Welcome Email to New Subscribers

Script Description: This script sends a welcome email to new subscribers who have signed up for your newsletter.

Script Code:

import accelemail

# Set up your AcceleMail account credentials
accelemail.api_key = "YOUR_API_KEY"
accelemail.api_secret = "YOUR_API_SECRET"

# Define the email template
template_name = "welcome_email"
template_data = {
    "name": "{{ name }}",
    "email": "{{ email }}"
}

# Define the email recipients
recipients = []

# Loop through new subscribers
for subscriber in accelemail.get_subscribers(status="new"):
    # Add the subscriber to the recipients list
    recipients.append(subscriber.email)

# Send the welcome email
accelemail.send_email(template_name, template_data, recipients)

# Log the script execution
print("Script executed successfully!")

How it works:

  1. The script imports the AcceleMail library and sets up your account credentials.
  2. It defines an email template with placeholders for the subscriber's name and email.
  3. It loops through new subscribers using the get_subscribers method and adds their email addresses to a list.
  4. It sends the welcome email using the send_email method, passing in the template name, template data, and recipients list.
  5. Finally, it logs the script execution to the console.

Tips and Variations:

I hope this example script helps you get started with AcceleMail!