Jump to content

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 webmaster@mysite.com from janedoe@anotherfakedomain.com was successfully sent

However, I do not get an email in my webmaster@mysite.com box.

Does anyone know why?

Here is mime.php

[code]

<?php


 
    $to = "webmasterr@mysite.com";
    $from = "janedoe@anotherfakedomain.com";
    $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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.