Re: mail()
| From: | Sempitech | Date: | Wed, 23 Apr 2003 01:05:27 +0000 |
| Subject: | Re: mail() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144932@lists.php.net to get a copy of this message | ||
Sorry, the first line got changed when I was posting this, it reads as
follows:
$mail_to = "me@mydomain.com";
So that is not the problem.
Thanks,
-Jon
"Sempitech" <admin@sempitech.com> wrote in message
news:20030423005607.10679.qmail@pb1.pair.com...
> Hello all. I just found these online newsgroups, so please forgive me if
> this is not the appropriate forum for my topic. Please direct me to the
> correct one if this is the case, thanks.
>
> Anyway, why I am here is becuase I have had this simple mail() script
> working fine since I put it in a few months ago. I noticed today that it
no
> longer sends mail. I have it used in 2 sites. Both do not work now. It
is
> as follows:
>
> <?php
> //contact_send.php
> //
> $mail_to = me@mydomain.com;
> $mail_subject = "mydomain.com contact form";
> $mail_body = "<p><b>mydomain.com contact form contact
> form</b></p>";
> $mail_body .= "<b>Name:</b> $name <br> ";
> $mail_body .= "<b>E-mail Address:</b> $email <br> ";
> $mail_body .= "<b>Message:</b> $message <br> ";
> //
> $headers = "From: $email - $name\r\n";
> $headers .= "Reply-To: me@mydomain.com\r\n";
> $headers .= "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> //
> if (mail($mail_to, $mail_subject, $mail_body, $headers))
> echo "Successfully sent the email: <br> $mail_body";
> else echo "Failed to send the email: <br> $mail_body";
> ?>
>
> I have just begun this php journey, so please forgive me if this is not
the
> correct forum for this question.
> Thanks,
> -Jon
>
>