Problem New Case Auto-Reply


I’m using the SuiteCRM-7.11.17 on CentOS 7.8 with Apache v2.4.6, php v7.2.34 and Mysql v5.6.49.

In the Inbound Email configuration, I put as “New Case Auto-Reply Template” the SUITE template “Case Creation”.

But, in the automatic response that I receive, I have two problems:

  1. The subject is not what is configured in this template.
    Configured in the Template “Case Creation”: $acase_name [CASE:$acase_case_number]
    I sent an email with the subject “problem ping”, and in the automatic reply the subject is “[CASE:71] problem ping”. Should be “problem ping [CASE:71]”, because it is configured $acase_name [CASE:$acase_case_number]

  2. The body of the email does not fill in the variables. I receive the following email:
    " Hi $contact_first_name $contact_last_name,

    We’ve received your case $acase_name (# $acase_case_number) on $acase_date_entered

    Status $acase_status
    Reference $acase_case_number
    Description $acase_description"

How to solve?


It sounds like the Email template is sending through the “New Case Auto-Reply Template” field, and not AOP/Cases itself.

It’s a little unclear, but I believe the Cases functionality sends out emails from the Templates selected in Admin->AOP Settings

Whereas the Email sent from “New Case Auto-Reply Template” parses the template differently, and may not catch the Case/Contact module variables

Typically, you won’t need to select a template for the “New Case Auto-Reply Template” field, as the Admin->AOP Settings should suffice

To get the most out of Cases/AOP, I’d recommend checking the following:

  • Templates are selected in Admin->AOP Settings
  • Ensure a Contact exists in the CRM that has the same email Address as the Sender of the Email
    (As the AOP functionality will relate the Contact to the Case that is created, and uses this to send Creation/Update/Closure emails)

Do you have the above scenarios set up?
If so, the AOP functionality should send the emails to the Sender, using the templates selected in Admin->AOP Settings

If you do have it set up like above, and are still having issues, let us know!

However, I’m not able to replicate your first issue.

I’m using the OOTB templates, which have the format:
$acase_name [CASE:$acase_case_number
And it comes through as:

However, hopefully if you run it through the AOP Settings templates, this will sort itself

But let us know how things go!

Thanks for your response.
The goal is to set up the automatic response by email account, as it will not be the same for all email accounts.

For “AOP Settings” are by default:

Here, the template is the same “Case Creation”. That is, the Subject is “$ acase_name [CASE: $ acase_case_number]”

And I’m getting “[CASE: $ acase_case_number] $ acase_name”:
Where can this configuration be?

Regarding the email body, at this stage of testing, the contact had not yet been created. However, if one of the variables is “$ acase_case_number”, at least it should appear. And does not appear in the email body.

Creating a contact with email, and sending an email from that contact, I receive two emails:

  1. Test send mail [CASE: 73]

  2. Re: [CASE: 73] Test send mail

Why do I receive two emails?
What is the correct configuration to create templates with the reply for each inbound email account?

Best regards,
Diogo Teixeira

Hey Diogo,

I actually just made an instructional video about this last week. I was having the same problem. Long story short, DO NOT set up the setting in the Inbound Email account. ONLY set up the settings in the AOP settings. If you set it up in both places, you will get two emails and the email generated from the inbound email settings does not work and does not insert the variables properly. Just disable it. Here’s a walkthrough video and my settings are visible:


Ow sweet! I love video content, great work on your youtube channel!

I’ve been looking to start video for the last 12 months, but not yet started. Like your video, thank you @pstevens !!

1 Like

@pstevens please make a separate post in the Show and Tell category whenever you create a new video, that should help more people be aware of it. And thanks for these videos! :tada:


Hi @pstevens,

Thanks for you response.
It’s a very good instructional video. Congratulations.

However, I need to generate different reply’s per inbound email account. So, unfortunately, the AOP settings don’t solve my problem.

Someone can help me? Thanks.

Diogo, What exactly are you trying to do, if you detail out what you want sent out and when, I can probably help you figure it out. If you need emails sent other than what is automatically sent by AOP, then you can use workflow to send whatever you like. You just need an appropriate trigger from the case module.

1 Like

Hi @pstevens,

I need to generate a different auto-reply by inbound email account.
For example, the inbound email account ‘aaaa@aaaa’ send the template ‘ABC’, the inbound email account ‘bbbb@bbbb’ send the template ‘DEF’, and the inbound email account ‘cccc@cccc’ don’t send email.

But, the auto-reply with template ‘ABC’ or ‘DEF’, only when a new case is open.
And in the auto-reply email, the body has some variables. For example, the number of the created case.


  1. Email sent to ‘aaaa@aaaa’, if the case don’t exist, generate this auto-reply:
    Subject: Re: [CASE: $acase_case_number] $acase_name
    Body: ‘Hi,
    The case $acase_case_number was open and will be analysed in 48h.

  2. Email sent to ‘bbbb@bbbb’, if the case don’t exist, generate this auto-reply:
    Subject: Re: [CASE: $acase_case_number] $acase_name
    Body: ‘Hi,
    We receive your contact, and the commercial department will talk with you in 24h.

Thanks for your help.

Hey Diogo,

Yeah, you’re not going to be able to do that without writing your own code. However, if the only difference in the reply is the the # of hours that a case will be responded to, then add a field in the contact record for “response time” and simply use that as a field in your email like… Thank you for submitting your response, your case will be analysed within $contact_response_time.

I can’t think of how you would send a different template to each individual contact, but as I noted above, you can use the same template and populate it with data from the contact record. Maybe you have a field in the contact record that contains the entire custom text you want to insert like “support_terms” as a text area and then in your email template "Thank you for submitting your case. $support terms.

Elaborate conditionals in Templates and attachments are possible with my PowerReplacer SuiteCRM add-on.

I’ve been playing with the idea of adding some drip-style functionality… basically I thought it could be nice to have a feature where the template is able to decide and schedule a follow-up, as the email is being sent.

The way this could work would be making use of the extensibility of my Twig-based templates. A special tag inside the template (eventually inside an if block) would have a side-effect of adding the email address to a target list, for example. Or directly into the mail queue (why not?)

So you would just add to an email template a line like

{{ requeue("in 3 days", template("Did you get it")) }}

It would be better if we didn’t need Mautic for that :smiley:

Sorry, don’t mean to hijack the thread , I was just going to write the 1st paragraph but then I got carried away… :blush:


@pgr that sounds great. I use Mautic quite a bit, mainly because you can’t really (at least not without a lot of effort) set up proper drip campaigns in SuiteCRM. In regard to what the poster is trying to do, Mautic uses a concept they call “dynamic content”. So for example, contacts in “segment A” would get the dynamic content let’s say “paragraph A” in their email whereas contacts in “segment B” would get “paragraph B” ,etc. Use case, is where I have a client that transports mainly chemical products over the road. However, like 30% of their clients have nothing to do with chemicals. So, when they send out drip emails, we send out the same emails, but the content that talks about chemicals is substituted with other content if the contact is in a “non-chemical” segment.