Jump to content

Archived

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

russia5

My MIME does not send?

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]

Share this post


Link to post
Share on other sites
Your server or hosting by someone else?  Is the mail server installed and working?

Is that an exact copy of your code?  I think you may have the email address spelled wrong.

Share this post


Link to post
Share on other sites
No... its not my email server.  My hosting company is a very good company and my webemail works from my client. 

I did not use the email in the posted example.  I am sure I used the right one.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Thankyou very Much!  It was my aol client.  For some reason, it did not come into the client or into the spam.  (which has me a bit concerned)  However, it did come into my site's webmail.

Share this post


Link to post
Share on other sites
Most of the time e-mail is almost instantaenous.  Sometimes it gets delayed for a bit though.  I wouldn't be surprised if you logged into AOL tomorrow and had several e-mails.

Share this post


Link to post
Share on other sites

×

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.