Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script problem,no recieve the mail

Featured Replies

First of all i don't know if i'm posting on the right section so please excuse me if the thread is wrong

 

Hi there,i'm using the starblaze template and i have a problem with the contact form i don't recieve the mail,i fill all the boxes clicking the star but no mail...

I tried to fix it,searching on google how to fix it checking all the php things but i don't have any clue,so please help me its an amazing template and i really want to use it.

 

Let me post the entire template because maybe its not from the php file.

 

If you resolve the problem please tell me where should i put my email.

starBlazeSiteTemplate.zip

Edited by CoNfuZ

In the php folder you have the 'process.php' file, this is the one that is doing the work.

<?php

   #recepient

   $recipient = 'test@test.com;

   #subject

   $subject = $_POST['subject'];

   #headers

   $headers = "From: Test <test@test.com>\r\n";

   #message

   $message =  "Name : {$_POST['name']}\n";

   $message .= "Email : {$_POST['email']}\n";

   $message .= "Subject : {$_POST['subject']}\n";

   $message .= "Message : {$_POST['message']}\n";



   if( mail($recipient, $subject, $message, $headers) ) echo "Mail Sent";

   else echo "Mail Could Not Be Send";

As you can see the last line is an if statement, you should be getting either "Mails Sent" or "Mail Could Not Be Send" after you click the submit button.

 

If you get "Mail Sent" then the problem is with your recipient email address - check the spelling etc,

If you get "Mail Could Not Be Send" then the problem is that you have not configured your servers mail sending facilities to be compatible with mail() and may need to use sendmail or smpt.

 

**EDIT**

I just noticed that $recipient is missing the closing ' and thus the rest of the code is not being processed. Check you have corrected this before trying anything else.

Edited by Weedy101

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.