Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8634799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:48:35+00:00 2026-06-12T09:48:35+00:00

Possible Duplicate: PHP Mail stops working without me editing the code I’ve had a

  • 0

Possible Duplicate:
PHP Mail stops working without me editing the code

I’ve had a problem with a clients mail function for a while. The thing is that the mail I use to receive the mails stops receiving mails from time to time. I’ve noticed this because when I change from my clients mail (info@allflytt.com) to my own (daniel@codia.se) it starts working properly. Also the “success function” gives me the message “The mail was not sent.” when I use my clients mail (info@allflytt.com). So the problem seems to be located in the mailadress wich somehow, sometimes, doesn’t accept the mails. This happens a couple of times every day and all I can do is wait for it to work again. I’ve posted the code below.

<?php

if(isset($_POST['submit'])){

$mottagare = 'info@allflytt.com';
$titel = 'Meddelande';

$namn = strip_tags($_POST['namn']);
$foretag = strip_tags($_POST['foretag']);
$adress = strip_tags($_POST['adress']);
$postnr = strip_tags($_POST['postnr']);
$ort = strip_tags($_POST['ort']);
$telefon = strip_tags($_POST['telefon']);
$epost = strip_tags($_POST['epost']);
$meddelande = strip_tags($_POST['meddelande']);

$meddelande=nl2br($meddelande);

$body = 
"
Namn: <b>". $namn ."</b><br />
Företag: <b>". $foretag ."</b><br />
Adress: <b>". $adress ."</b><br />
Postnr: <b>". $postnr ."</b><br />
Ort: <b>". $ort ."</b><br />
Telefon: <b>". $telefon ."</b><br />
E-post: <b>". $epost ."</b><br /><br />
Meddelande: <b><br />". $meddelande
;

$headers =  'From: '. $namn .' <webmaster@allflytt.com>' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();

$success = mail($mottagare, $titel, $body, $headers);

}

?>

            <?php
                if(!($success)){
                    echo "<p class=\"field_error\">The mail was not sent.</p>";
                }
            ?>

            <?php
                if($success){
                    echo "<p class=\"p_success\">Great! The mail was sent.</p>";
                }
            ?>

    <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>">

    <p>
        <label for="namn">Namn: *</label><br />
        <input type="text" name="namn" id="namn" class="text" tabindex="15" />
            <br />
        <label for="foretag">Företag:</label><br />
        <input type="text" name="foretag" id="foretag" class="text" tabindex="20" />
            <br />
        <label for="adress">Adress:</label><br />
        <input type="text" name="adress" id="adress" class="text" tabindex="30" />
            <br />
        <label for="postnr">Postnummer:</label><br />
        <input type="text" name="postnr" id="postnr" class="text_medium" tabindex="40" />
            <br />
        <label for="ort">Ort:</label><br />
        <input type="text" name="ort" id="ort" class="text" tabindex="50" />
            <br />
        <label for="telefon">Telefon: *</label><br />               
        <input type="text" name="telefon" id="telefon" class="text" tabindex="60" />
            <br />
        <label for="epost">E-post:</label><br />                
        <input type="text" name="epost" id="epost" class="text" tabindex="70" />
            <br />
        <label for="meddelande">Meddelande: *</label><br />             
        <textarea name="meddelande" id="meddelande" class="textarea" tabindex="80"></textarea>
            <br />  
        <input type="submit" name="submit" value="Skicka" class="submit" />
    </p>

    </form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:48:36+00:00Added an answer on June 12, 2026 at 9:48 am

    Problem solved. Changed to a new server host. No issues any more!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: PHPMailer AddAddress() Here is my code. require('class.phpmailer.php'); $mail = new PHPMailer(); $email
Possible Duplicate: php mail() function on localhost I am using php mail(). I have
Possible Duplicate: SMS from web application Sample code to send Mail via php //
Possible Duplicate: SMS from web application Sample code to send Mail via php //
Possible Duplicate: How do I send emails with Arabic content via PHP's mail function?
Possible Duplicate: php mail() function on localhost I'm trying to do some localhost testing
Possible Duplicate: PhpMailer vs. Swiftmailer? I have always used PHP's built in mail() function
Possible Duplicate: Why shouldn’t I use PHP’s mail() function? In PHP, as long as
Possible Duplicate: Sending HTML email from PHP I need to send an html mail
Possible Duplicate: PHP create a file without fopen I want to create a file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.