Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
4.9.2. Check outgoing mail via PHP mail
- Select in the site settings the mailbox for outgoing mail (if not selected)
- Using file manager or any FTP client in the site root directory, create a
test.phpfile with this code:<?php $from = "sender@example.com"; // replace with the address of any mailbox from your account $to = "recipient@example.com"; // replace with the address of the mailbox where you will check for the receipt of the message $subject = "Test mail"; $message = "hello"; $headers = "From: " . $from . "\r\n" . "Content-type:text/html;charset=utf-8" . "\r\n" . "X-Mailer: PHP/" . phpversion(); error_reporting(E_ALL); ini_set("display_errors", "1"); if (mail($to, $subject, $message, $headers)) { echo "ok"; } else { echo "error"; } - Run the script via a browser by appending
test.phpto your site address (e.g.,example.com/test.php). - Check the recipient's mailbox for the message that the script was supposed to send.
If the script displays an "error" or the mail does not appear in the recipient's mailbox (including the spam folder), please contact us via online chat and provide a link to the script you used to test the mail.