• Resolved KratosGemini

    (@kratosgemini)


    Is there an easy way to force Email Simulation via PHP, like an optional constant or filter?

    This would be very helpful for development and staging environments. We currently do something similar with our current SMTP plugin, but we are looking to switch to a better one. But I don’t see a supported way to do this with SureMail, unless I’m missing something.

    Thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Avinash Kumar Sharma

    (@avi1020p)

    Hello @kratosgemini,

    Thank you for reaching out 🙂

    I checked this with our development team, and we would need a bit more detail on what exactly you would like to achieve using a constant or filter.

    Currently, SureMail already includes a built-in Email Simulation feature that you can enable from the dashboard:

    1. Go to SureMail > Settings
    2. Scroll down to Email Simulation
    3. Enable the checkbox to activate it

    Once enabled, emails will be simulated instead of being sent.

    You can also refer to our documentation here for more details:
    https://suremails.com/docs/email-simulation/

    If you can share a bit more about your specific use case (for example, environment-based automation), we’ll be happy to discuss it further with the team and see how we can improve this experience.

    Looking forward to your response.

    Best Regards,
    Avinash

    Thread Starter KratosGemini

    (@kratosgemini)

    Environment-based automation is exactly the reason. To avoid unintended side-effects when using staging or local development environments, we have code that detects a non-production environment and disables or reroutes certain features. One of the features that is very important to disable is live email sending. Otherwise, clients could get emails with URLs from our development or staging environments (and to make matters more confusing, these would be duplicate emails).

    There are various reasons why unwanted sending of live emails could be triggered on a non-production site without any developer intervention. For example, if there is a process that sends a follow-up email at a certain time (such as paying the balance of a product that had a deposit paid). This has happened before, which is why we included code to disable functions like this.

    Our current email plugin has a constant that when defined, does email simulation. So our code sets this constant automatically on non-production environments. Another alternate email plugin I’ve tested out, FluentSMTP, also provides such functionality via an optionally defined constant. However, I’m endeavoring to go with SureMail in the hopes that one day this unrelated feature will be added: https://ideas.suremails.com/boards/feature-requests/posts/permissions-to-view-email-log-for-non-admins. (I’ve asked FluentSMTP about adding that feature, but as of now they have no plans to.) Aside from this email simulation issue, FluentSMTP is equivalent. So my desire to use SureMail is a hope that maybe some day the non-admin email log viewing feature will be added (which would make our lives better). However, not being able to automate the enabling of email simulation is a deal-breaker for switching for us.

    Does that help?

    Thanks for considering.

    P.S. In case it’s not clear, our staging and development environments are copies of our production environments that are refreshed on occasion. This ensures that things like new pages or products make their way over to our staging and development environments. But this also means that those environments contain already in-process real customer interactions. Hence, the issue if delayed emails are sent. Our process makes testing things on other environments very convenient with minimal manual changes, but it has the side-effect of being problematic if certain processes like emails, webhooks, etc. run on those environments without alternations.

    • This reply was modified 2 weeks, 5 days ago by KratosGemini. Reason: Added more detail
    Plugin Support Avinash Kumar Sharma

    (@avi1020p)

    Hello @kratosgemini ,

    Thank you for sharing more details about your query.

    I have discussed this with our development team, and we’ve added it as a task to our development roadmap.

    You can also submit this request on our public ideas board so other users can upvote it:
    https://ideas.suremails.com/boards/feature-requests.

    For now, you can continue using the email simulation option available in the plugin settings.

    Please feel free to let us know if you have any other questions. We’re happy to help.

    Best Regards,
    Avinash

    Thread Starter KratosGemini

    (@kratosgemini)

    I submitted the feature request. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.