Inquiry Regarding Kirby Uniform

I am using Uniform for sending emails.
However, when the recipient is using a regular Gmail account, they receive a warning that the email is not secure. Is there a way to resolve this issue?
Additionally, is there a way to change the profile picture when an email is received?

controllers

<?php


use Uniform\Form;

return function ($kirby)
{
    $form = new Form([
        'name' => [
            'rules' => ['required'],
            'message' => 'Name is required',
        ],
        'email' => [
            'rules' => ['required', 'email'],
            'message' => 'Email is required',
        ],
        'phone' => [
            'rules' => ['required'],
            'message' => 'Phone is required',
        ],
        'inquiring_product' => [
            'message' => 'Inquiring product is required',
        ],
        'product_use' => [
            'message' => 'Product use is required',
        ],
        'quantity' => [
            'message' => 'Quantity is required',
        ],
        'qna' => [
            'message' => 'Q&A is required',
        ],

    ]);

    if ($kirby->request()->is('POST')) {
        $form->emailAction([
            'to' => 'order@post-standards.com',
            'from' => 'noreply@post-standards.com',
            'bcc' => get('email'),
            'subject' => '[Post Standards] 새 프로젝트 의뢰',
        ]);
    }

    return compact('form');
};

Thank you.

It would help to see what the warning says in English, but my guess it is has to do with sender reputation, and definitely not with the plugin.

Google translate says:

This is an email you need to be careful about.
12:42 PM (3 minutes ago) ☆
This email is from post-standards.com, but replies will be sent to an email address on a different domain. Do not reply to this email unless you have confirmed that this email address is genuine by contacting the sender through other means.

The replyTo address is on a different domain because Uniform automatically sets it to the value of the “email” field. So you could make the warning go away by manually setting "replyTo" to "noreply@post-standards.com":

        $form->emailAction([
            'to' => 'order@post-standards.com',
            'from' => 'noreply@post-standards.com',
            'replyTo' => 'noreply@post-standards.com',
            'bcc' => get('email'),
            'subject' => '[Post Standards] 새 프로젝트 의뢰',
        ]);

But you’ll obviously lose the option to reply to a message just by clicking “reply” in Gmail.

It might also go away if you add something like an SPF record to your post-standards.com domain (which it doesn’t have now). Just make sure it includes all the places you send emails from: the website, Gmail (I guess), etc… This way Gmail at least gets something to guess how a valid message from that domain should look like.

1 Like