Jump to content

My MIME does not send?


russia5

Recommended Posts

Hello, My MIME code seems not to send anything out.  The script is loaded on www.mysite.com/mime.php  When I put my test email into $to  I get the folloing message printed back to www.mysite.com/mime.php:

The email to [email protected] from [email protected] was successfully sent

However, I do not get an email in my [email protected] box.

Does anyone know why?

Here is mime.php

[code]

<?php


 
    $to = "[email protected]";
    $from = "[email protected]";
    $subject = "This is a test email";
    $message = <<<EOF
    <html>
  <body bgcolor="#ffffff">
    <p align="center">
        <b>Hello World!</b>
    </p>
  </body>
</html>
EOF;
$headers  = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";

    $success = mail($to, $subject, $message, $headers);
    if ($success) {
        echo "The email to $to from $from was successfully sent";
        }
    else {
        echo "An error occurred when sending the email to $to from $from";
        }
?>


[/code]

Link to comment
https://forums.phpfreaks.com/topic/20387-my-mime-does-not-send/
Share on other sites

Ok, so you're using something similar to what is in the example.  It says it is being sent, but you're not getting it.

The only thing I can conclude is that something is messed up in the configuration (no matter how "good" of a company it is that you are using) or that your email address isn't right or you're somehow blocking it.  Have you checked your spam mail?  Do you have spam-assassin enabled or something?  It's probably not handling the "from" portion right and your spam blocker isn't picking it up.

Also, your webmail from your host probably doesn't use the same setup.
Link to comment
https://forums.phpfreaks.com/topic/20387-my-mime-does-not-send/#findComment-89898
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.