Jump to content


Photo

My MIME does not send?


  • Please log in to reply
6 replies to this topic

#1 russia5

russia5
  • Members
  • PipPipPip
  • Advanced Member
  • 94 posts

Posted 11 September 2006 - 01:37 PM

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


 <?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"; 
        }
?> 






#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 11 September 2006 - 03:50 PM

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.

Info: PHP Manual


#3 russia5

russia5
  • Members
  • PipPipPip
  • Advanced Member
  • 94 posts

Posted 11 September 2006 - 04:55 PM

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.



#4 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 11 September 2006 - 05:17 PM

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.

Info: PHP Manual


#5 russia5

russia5
  • Members
  • PipPipPip
  • Advanced Member
  • 94 posts

Posted 11 September 2006 - 06:52 PM

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.

#6 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 11 September 2006 - 07:02 PM

Glad to hear it :)

Info: PHP Manual


#7 roopurt18

roopurt18
  • Staff Alumni
  • Advanced Member
  • 3,749 posts
  • LocationCalifornia, southern

Posted 11 September 2006 - 07:28 PM

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.
PHP Forms : Part I | Part II

JavaScript: Singleton

http://www.rbredlau.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users