Contact Form Not Emailing

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
tlchost
Posts: 4
Joined: Fri Jan 20, 2023 11:28 am

Contact Form Not Emailing

Post by tlchost » Sun Jan 22, 2023 11:36 pm

New Installation of Flatpress....contact form does not email.
Any suggestions

User avatar
fraenkiman
FlatPress Coder
Posts: 503
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Contact Form Not Emailing

Post by fraenkiman » Mon Jan 23, 2023 1:09 am

Hello tlchost,

without taking a shot in the dark, I recommend this Wiki article.

With best regards
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io, synced with :elephant: Mastodon

User avatar
Arvid
FlatPress Coder
Posts: 630
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Contact Form Not Emailing

Post by Arvid » Sun Mar 05, 2023 12:35 pm

Hi,

does your blog title contain non-ASCII characters such as German umlauts? Because in this case, the email isn't sent properly.
We just added a fix, it will be part of FlatPress 1.3.

All the best,
Arvid

User avatar
WineMan
Posts: 138
Joined: Tue Sep 01, 2020 5:03 pm

Re: Contact Form Not Emailing

Post by WineMan » Wed May 20, 2026 3:37 pm

I am not getting the emails through the contact form. Using the wiki article, I was able to receive the test email after providing the relevant details so It is working. I suspect that my "from" email is the problem but I can't find the file that contains that information in the flatpress application. Can someone point me to where I would have added the from email address. Here is the file I a talking about from the wiki article.

Code: Select all

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
 
$recipient = "your-mail-server@domain.ltd";
$subject = "Subject with non-ASCII characters: ÖöÄäÜüó¿¡á";
$text = "The e-mail was sent successfully";
 
// Subject (RFC 2047, Base64-encoded for UTF-8)
$encoded_subject = '=?utf-8?B?' . base64_encode($subject) . '?=';
 
// Header
$headers  = "Date: " . date('r') . "\r\n";
$headers .= "From: Sender <your-mail-server@domain.ltd>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=\"UTF-8\"\r\n";
 
if (mail($recipient, $encoded_subject, $text, $headers)) {
	echo "Test email sent\n";
} else {
	echo "Error sending email\n";
}
?>

User avatar
WineMan
Posts: 138
Joined: Tue Sep 01, 2020 5:03 pm

Re: Contact Form Not Emailing

Post by WineMan » Thu May 21, 2026 3:54 am

Disregard this post...I figured out what the problem was.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests