• Resolved stefano79roma

    (@stefano79roma)


    I successfully installed AI Engine on the website and launched the chat on my website without any problems. Unfortunately, when the user provides their details to be contacted, the system says that the user’s details will be sent to the company, but this does not actually happen. The log of the installed SMTP plugin does not detect any attempts to send emails as configured. I wanted to ask if there is a problem or if only the Pro version guarantees this result.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @stefano79roma!

    That message about “sending your details to the company” actually comes from the AI’s imagination. It’s not something the plugin really does. The chatbot sometimes role-plays as a support assistant and hallucinates actions like sending emails, but nothing is actually sent. Totally normal behavior 😋

    If you’d like to make it real, you can! One option is to use Code Engine to create a small PHP snippet that sends the email, and then let your chatbot call that snippet when needed. You can see a more advanced example here: https://ai.thehiddendocs.com/use-function-calling/.

    The function you would actually add to Code Engine could be exactly this:

    function meow_send_email( $to, $message, $name = '', $email = '' ) {
    $subject = 'New message from your AI chatbot';
    $to = sanitize_email( $to );
    $name = sanitize_text_field( $name );
    $email = sanitize_email( $email );
    $message = wp_kses_post( $message );

    $body = "You received a new message from your AI chatbot:\n\n";
    $body .= $message . "\n\n";
    if ( $name || $email ) {
    $body .= "Contact details:\n";
    if ( $name ) $body .= "Name: $name\n";
    if ( $email ) $body .= "Email: $email\n";
    }

    return wp_mail( $to, $subject, $body );
    }

    Have a nice weekend! ☀️
    Jordy

    Thread Starter stefano79roma

    (@stefano79roma)

    Thanks, but unfortunately it doesn’t work. If I turn into a Pro plan, it’s possible to add AI forms directly on the chatbot when the bot asks for customer’s contacts?

    Thread Starter stefano79roma

    (@stefano79roma)

    Hi, no replies?

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

The topic ‘AI Engine doesn’t send mail’ is closed to new replies.