Back

API Usage Examples

Here are practical examples of how to use the Email API for different scenarios. Replace YOUR_API_TOKEN with your actual API token from your account dashboard.

Base Configuration
Endpoint: POST https://email.juanitocomponent.com/api/send-email
Headers:
  Content-Type: application/json
  Authorization: Bearer YOUR_API_TOKEN
Custom SMTP - User/Pass Only
Use custom SMTP credentials with default host (smtp.gmail.com) and port (587).
Request Body
{
  "from": "My App",
  "to": "recipient@example.com",
  "subject": "Email with custom user/pass",
  "body": "<h1>Hello</h1><p>This uses SMTP with default host.</p>",
  "credentials": {
    "user": "myuser@mydomain.com",
    "pass": "mySecurePassword"
  }
}
Gmail SMTP (Requires App Password)
Send emails using Gmail SMTP with app password authentication.
Request Body
{
  "from": "My App",
  "to": "recipient@gmail.com",
  "subject": "Email with Gmail",
  "body": "<p>Test with Gmail SMTP.</p>",
  "credentials": {
    "user": "youraccount@gmail.com",
    "pass": "GENERATED_APP_PASSWORD",
    "host": "smtp.gmail.com",
    "port": 587,
    "secure": false,
    "requireTLS": true
  }
}
Outlook / Office365 SMTP
Send emails using Outlook or Office365 SMTP server.
Request Body
{
  "from": "My App",
  "to": "recipient@outlook.com",
  "subject": "Email with Outlook",
  "body": "<p>Test with Outlook SMTP.</p>",
  "credentials": {
    "user": "youraccount@outlook.com",
    "pass": "YOUR_PASSWORD",
    "host": "smtp.office365.com",
    "port": 587,
    "secure": false,
    "requireTLS": true
  }
}
Yahoo SMTP
Send emails using Yahoo SMTP with app password authentication.
Request Body
{
  "from": "My App",
  "to": "recipient@yahoo.com",
  "subject": "Email with Yahoo",
  "body": "<p>Test with Yahoo SMTP.</p>",
  "credentials": {
    "user": "youraccount@yahoo.com",
    "pass": "APP_PASSWORD",
    "host": "smtp.mail.yahoo.com",
    "port": 465,
    "secure": true,
    "requireTLS": false
  }
}
Zoho Mail SMTP
Send emails using Zoho Mail SMTP server.
Request Body
{
  "from": "My App",
  "to": "recipient@zoho.com",
  "subject": "Email with Zoho",
  "body": "<p>Test with Zoho SMTP.</p>",
  "credentials": {
    "user": "youraccount@zoho.com",
    "pass": "APP_PASSWORD",
    "host": "smtp.zoho.com",
    "port": 587,
    "secure": false,
    "requireTLS": true
  }
}
Login Code
Send a secure 6-digit login code for two-factor authentication.
Request Body
{
  "from": "Email Verification",
  "to": "user@example.com",
  "subject": "Your Login Code - 357984",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #4f46e5; text-align: center;'>Login Code</h1><p>Here is your login code:</p><div style='font-size: 24px; padding: 15px; background-color: #f0f0f0; text-align: center; letter-spacing: 5px; margin: 20px 0; border-radius: 5px;'>357984</div><p>This code will expire in 10 minutes.</p><p>If you didn't request this login code, please ignore this email.</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "noreply@email.juanitocomponent.com"
}
Email Verification
Send a verification email with a 6-digit code to confirm user registration.
Request Body
{
  "from": "Email Verification",
  "to": "user@example.com",
  "subject": "Verify Your Email Address",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #4f46e5; text-align: center;'>Email Verification</h1><p>Thank you for registering! Your verification code is:</p><div style='font-size: 24px; padding: 15px; background-color: #f0f0f0; text-align: center; letter-spacing: 5px; margin: 20px 0; border-radius: 5px;'>123456</div><p>This code will expire in 30 minutes.</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "support@yourdomain.com"
}
Password Reset
Send a password reset link with a secure token to help users recover their account.
Request Body
{
  "from": "Account Security",
  "to": "user@example.com",
  "subject": "Reset Your Password",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #4f46e5; text-align: center;'>Password Reset Request</h1><p>You requested to reset your password. Click the link below:</p><a href='https://yourapp.com/reset-password?token=abc123' style='display: inline-block; padding: 12px 24px; background-color: #dc2626; color: white; text-decoration: none; border-radius: 5px;'>Reset Password</a><p>This link expires in 1 hour. If you didn't request this, please ignore this email.</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "security@yourdomain.com"
}
Welcome Email
Send a warm welcome email to new users with helpful onboarding information.
Request Body
{
  "from": "Welcome Team",
  "to": "newuser@example.com",
  "subject": "Welcome to Our Platform!",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #4f46e5; text-align: center;'>Welcome aboard! 🎉</h1><p>Hi there,</p><p>We're excited to have you join our community. Here's what you can do to get started:</p><ul><li>Complete your profile</li><li>Explore our features</li><li>Join our community</li></ul><p>If you have any questions, just reply to this email!</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "welcome@yourdomain.com"
}
Order Confirmation
Send a detailed order confirmation with receipt and shipping information.
Request Body
{
  "from": "Your Store",
  "to": "customer@example.com",
  "subject": "Order #12345 Confirmed",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #4f46e5; text-align: center;'>Thank you for your order!</h1><p>Order #12345 has been confirmed.</p><h3>Order Details:</h3><ul><li>Product: Premium Widget</li><li>Quantity: 2</li><li>Total: $99.98</li></ul><p>Estimated delivery: 3-5 business days</p><p>Track your order: <a href='#'>Click here</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "orders@yourdomain.com"
}
Newsletter
Send a weekly newsletter with company updates and featured content.
Request Body
{
  "from": "Weekly Newsletter",
  "to": "subscriber@example.com",
  "subject": "This Week's Updates - Issue #42",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #4f46e5; text-align: center;'>This Week's Newsletter</h1><h2>Featured Stories</h2><h3>New Product Launch</h3><p>We're excited to announce our latest product...</p><h3>Industry Insights</h3><p>This week we explore the latest trends...</p><h3>Upcoming Events</h3><p>Don't miss our upcoming webinar...</p><p><a href='#'>Read more on our blog</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "newsletter@yourdomain.com"
}
Appointment Reminder
Send appointment reminders with calendar integration and cancellation options.
Request Body
{
  "from": "Appointment System",
  "to": "patient@example.com",
  "subject": "Appointment Reminder - Tomorrow at 2:00 PM",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Appointment Reminder</h1><p>Hi John,</p><p>This is a reminder for your appointment tomorrow:</p><ul><li>Date: Tomorrow</li><li>Time: 2:00 PM</li><li>Location: 123 Medical Center</li></ul><p>Please arrive 15 minutes early.</p><p><a href='#'>Reschedule</a> | <a href='#'>Cancel</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "appointments@yourdomain.com"
}
Two-Factor Authentication
Send a secure 2FA code for enhanced account security.
Request Body
{
  "from": "Security Alert",
  "to": "user@example.com",
  "subject": "Your Login Code - 123456",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Login Verification</h1><p>Someone is trying to access your account.</p><p>If this was you, use this code to complete your login:</p><div style='font-size: 24px; padding: 15px; background-color: #f0f0f0; text-align: center; letter-spacing: 5px; margin: 20px 0; border-radius: 5px;'>123456</div><p>This code expires in 10 minutes.</p><p>If this wasn't you, please secure your account immediately.</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "security@yourdomain.com"
}
Invoice
Send a professional invoice with payment details and due date.
Request Body
{
  "from": "Billing Department",
  "to": "client@example.com",
  "subject": "Invoice #INV-2024-001 - Due in 30 days",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Invoice #INV-2024-001</h1><p>Dear Client,</p><p>Please find attached your invoice for services rendered.</p><h3>Invoice Details:</h3><ul><li>Amount: $1,250.00</li><li>Due Date: March 15, 2024</li><li>Payment Terms: Net 30</li></ul><p><a href='#'>View Invoice</a> | <a href='#'>Pay Now</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "billing@yourdomain.com"
}
Event Invitation
Send an elegant event invitation with RSVP functionality.
Request Body
{
  "from": "Event Organizer",
  "to": "guest@example.com",
  "subject": "You're Invited: Annual Tech Conference 2024",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>You're Invited!</h1><p>Dear Tech Enthusiast,</p><p>We're excited to invite you to our Annual Tech Conference:</p><ul><li>Date: March 20, 2024</li><li>Time: 9:00 AM - 6:00 PM</li><li>Location: Tech Center, San Francisco</li></ul><p>RSVP by March 10th</p><p><a href='#'>Accept</a> | <a href='#'>Decline</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "events@yourdomain.com"
}
Support Ticket
Send a support ticket confirmation with tracking number and status.
Request Body
{
  "from": "Support Team",
  "to": "customer@example.com",
  "subject": "Support Ticket #TKT-2024-001 Created",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Support Ticket Created</h1><p>Hi Sarah,</p><p>We've received your support request and created ticket #TKT-2024-001.</p><h3>Ticket Details:</h3><ul><li>Priority: High</li><li>Category: Technical Issue</li><li>Status: In Progress</li></ul><p>Our team will respond within 24 hours.</p><p><a href='#'>View Ticket</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "support@yourdomain.com"
}
Job Application
Send a job application confirmation with next steps and timeline.
Request Body
{
  "from": "HR Department",
  "to": "applicant@example.com",
  "subject": "Application Received - Senior Developer Position",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Application Received</h1><p>Dear John,</p><p>Thank you for applying for the Senior Developer position.</p><h3>Next Steps:</h3><ol><li>We'll review your application (3-5 days)</li><li>If selected, you'll receive a coding challenge</li><li>Final interview with the team</li></ol><p>We'll keep you updated throughout the process.</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "hr@yourdomain.com"
}
Subscription Renewal
Send a subscription renewal reminder with pricing and cancellation options.
Request Body
{
  "from": "Billing Team",
  "to": "subscriber@example.com",
  "subject": "Your subscription will renew on March 15, 2024",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Subscription Renewal Reminder</h1><p>Hi there,</p><p>Your Premium subscription will automatically renew on March 15, 2024.</p><h3>Renewal Details:</h3><ul><li>Plan: Premium ($29.99/month)</li><li>Next billing: March 15, 2024</li><li>Payment method: Visa ending in 1234</li></ul><p><a href='#'>Manage Subscription</a> | <a href='#'>Cancel</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "billing@yourdomain.com"
}
Password Changed
Send a security notification when a password is successfully changed.
Request Body
{
  "from": "Security Team",
  "to": "user@example.com",
  "subject": "Your password was changed successfully",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Password Changed Successfully</h1><p>Hi there,</p><p>Your password was changed on March 10, 2024 at 2:30 PM.</p><p>If you made this change, no action is needed.</p><p>If you didn't change your password:</p><ul><li>Reset your password immediately</li><li>Enable two-factor authentication</li><li>Contact our support team</li></ul><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "security@yourdomain.com"
}
Account Locked
Send a notification when an account is temporarily locked for security.
Request Body
{
  "from": "Security Alert",
  "to": "user@example.com",
  "subject": "Your account has been temporarily locked",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Account Security Alert</h1><p>Hi there,</p><p>We detected multiple failed login attempts on your account. For your security, we've temporarily locked your account.</p><h3>What to do:</h3><ol><li>Wait 30 minutes for automatic unlock</li><li>Or reset your password now</li><li>Enable two-factor authentication</li></ol><p><a href='#'>Unlock Account</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "security@yourdomain.com"
}
Welcome Back
Send a welcome back email to returning users with personalized content.
Request Body
{
  "from": "Welcome Back",
  "to": "returning@example.com",
  "subject": "Welcome back! We missed you",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Welcome back! 👋</h1><p>Hi there,</p><p>We noticed you haven't been around for a while. Here's what's new:</p><h3>New Features:</h3><ul><li>Enhanced dashboard</li><li>Mobile app available</li><li>New integrations</li></ul><p><a href='#'>Explore New Features</a></p><p>We're glad to have you back!</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "welcome@yourdomain.com"
}
Product Launch
Announce a new product launch with exclusive early access.
Request Body
{
  "from": "Product Team",
  "to": "customer@example.com",
  "subject": "🚀 New Product Launch - Get Early Access!",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>🚀 New Product Launch!</h1><p>We're excited to announce our latest innovation!</p><h3>What's New:</h3><ul><li>Advanced AI features</li><li>Enhanced security</li><li>Faster performance</li></ul><p>Get exclusive early access with 50% off!</p><p><a href='#'>Get Early Access</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "product@yourdomain.com"
}
Survey Request
Send a customer satisfaction survey to gather feedback.
Request Body
{
  "from": "Customer Success",
  "to": "customer@example.com",
  "subject": "We'd love your feedback - 5 minutes survey",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Help Us Improve! 📝</h1><p>Hi there,</p><p>We'd love to hear about your experience with our service.</p><p>Your feedback helps us make our product better for everyone.</p><p>It only takes 5 minutes to complete.</p><p><a href='#'>Take the Survey</a></p><p>Thank you for your time!</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "feedback@yourdomain.com"
}
Payment Confirmation
Send a payment confirmation with transaction details.
Request Body
{
  "from": "Payment System",
  "to": "customer@example.com",
  "subject": "Payment Confirmed - Transaction #TXN-2024-001",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Payment Confirmed ✅</h1><p>Hi there,</p><p>Your payment has been successfully processed.</p><h3>Transaction Details:</h3><ul><li>Amount: $99.99</li><li>Date: March 10, 2024</li><li>Transaction ID: TXN-2024-001</li><li>Payment Method: Visa ending in 1234</li></ul><p><a href='#'>View Receipt</a></p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "payments@yourdomain.com"
}
Maintenance Alert
Notify users about scheduled maintenance and downtime.
Request Body
{
  "from": "System Admin",
  "to": "user@example.com",
  "subject": "Scheduled Maintenance - March 15, 2024",
  "body": "<div style='font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e0e0e0; border-radius: 5px;'><h1 style='color: #dc2626; text-align: center;'>Scheduled Maintenance 🔧</h1><p>Hi there,</p><p>We'll be performing scheduled maintenance to improve our service.</p><h3>Maintenance Details:</h3><ul><li>Date: March 15, 2024</li><li>Time: 2:00 AM - 4:00 AM EST</li><li>Duration: 2 hours</li></ul><p>During this time, our service will be temporarily unavailable.</p><p>We apologize for any inconvenience.</p><p style='margin-top: 30px; font-size: 12px; color: #666; text-align: center;'>© 2025 Email Verification. All rights reserved.</p></div>",
  "replyTo": "admin@yourdomain.com"
}