Mail send from vhost

NethServer Version: your_version 7
Module: your_module

i have some vhosts, which works fine. So i have also a contact form. Sending mail from this, result in a mail from apache@nethserver.mydomain.loc and so it is not send from the Mail in Nethserver.
Is there a way to correct it ?
Thanks for your help

Hello @juergen,

I don’t know your contact form but you should be able to set the from address there, just an example for mailing with php. I think you also have to create a user that matches the from mail address.

$to = "markus@cmb.local";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "mailuser@cmb.local";
$headers = "From: $from";
echo "Mail Sent.";


See also: