WebSite X5Help Center

 
Hakki Y.
Hakki Y.
User

Php mail didn't work my site.  en

Author: Hakki Y.
Visited 583, Followers 1, Shared 0  

I'am using another domain. I am using Php 7.4. The mail sending function does not work somehow.Can someone help?

<?php
if(substr(basename($_SERVER['PHP_SELF']), 0, 11) == "imEmailForm") {
include '../res/x5engine.php';
$form = new ImForm();
$form->setField('Eposta Adresiniz', @$_POST['imObjectForm_23_1'], '', false);

$errorMessage = '';
if(@$_POST['action'] != 'check_answer') {
if(!isset($_POST['imJsCheck']) || $_POST['imJsCheck'] != '50B54606BF3094C6E1B2B27D5AEC848B' || (isset($_POST['imSpProt']) && $_POST['imSpProt'] != ""))
die(imPrintJsError());
$form->mailToOwner('***', '', '***', 'Bize Ulasin', "", false);
@header('Location: ../index anasayfa.html');
exit();
} else {
echo $form->checkAnswer(@$_POST['id'], @$_POST['answer']) ? 1 : 0;
}
}

// End of file

Thanks.

Posted on the
3 ANSWERS - 2 USEFUL
Daniel W.
Daniel W.
User
Best User of the month EN

What does "other domain" mean?

Use a domain email address in WebSite X5 and forward to another email address if necessary.

Read more
Posted on the from Daniel W.
Daniel W.
Daniel W.
User
Best User of the month EN

Domain mail adress, see

-----

With some providers, you can't set the visitor's e-mail address as the sender of the e-mail leaving the website because they block e-mails that don't have the same domain as the website they are sent from.

>> https://guide.websitex5.com/en/support/solutions/articles/44000897389-so-werden-daten-per-e-mail-gesendet

----

Example:

Domain: mywebsite.com

Domain mail adress: contact @ mywebsite.com (without spaces)

-----

Insert the domain mail adress in WebSite X5 here ...

5 Export > Export the website to the Internet / Parameter

_____________/ E-Mail /

... to send data by mail.

When it comes to own programming, the PHP programmers would have to comment on it.

Read more
Posted on the from Daniel W.
Hakki Y.
Hakki Y.
User
Author

Thanks Daniel. My problem is solved. My provider only use SMTP mail. I was try only PHP Mail. 

Read more
Posted on the from Hakki Y.