Learn how to send emails using the WaveAssist SDK.

Basic Usage

import waveassist

# Initialize WaveAssist with your credentials
waveassist.init(
    "your-api-token",
    "your-project-key"
)

# Send a simple HTML email
waveassist.send_mail(
    subject="Test Email",
    html_content="<p>This is a test email sent from WaveAssist.</p>"
)

Function Parameters

ParameterTypeDescription
subjectstrSubject line of the email
html_contentstrHTML content of the email body
attachment_fileOptional[file]File object opened in binary mode (‘rb’) to attach to the email (optional)

Example with Custom Content

import waveassist

# Initialize WaveAssist
waveassist.init(
    "your-api-token",
    "your-project-key"
)

# Send an email with formatted HTML content and attachment
with open('document.pdf', 'rb') as file:
    waveassist.send_mail(
        subject="Terminal Test Email",
        html_content="<p>This is a test email sent from terminal.</p>",
        attachment_file=file
    )
ParameterTypeRequiredDescription
subjectstrYesSubject line of the email
html_contentstrYesHTML content of the email body
attachment_filefileNoFile object opened in binary mode (‘rb’) to attach to the email