mail() problem 
Author Message
 mail() problem

Hi,

I'm having problems sending email with the mail()function of php. I want to
send an html-form in an email which contains a table which contains itself
select-tag options.  I get the following warning :

Warning: Failed to Receive in c:\program
files\easyphp\www\mywebsql\timereg.php on line 59.

When I leave out the options from de select- tag then I have no warning and
my mail is sent properly (that is without the select options of course).

Are there any restrictions in using html with the mail()function or  am I
doing something wrong?

I would very much appreciate some help on this.

here is some of the code I use :

$myname = "Me Myself";

$contactname = "Mister Contact";

$message = "Please submit this table properly filled in, thank you.<br>";
$message .= "<FORM ACTION='test.php' METHOD='POST'>";        //action =
http:// -address
$message .= "<TABLE WIDTH='90%' BORDER='1' ALIGN='center' bgcolor
='#F9F9F9'";
$message .= " CELLSPACING='1' CELLPADDING='1' BORDERCOLOR='#BFBFBF'
BORDERCOLORLIGHT='#E1E1E1'>";
$message  .= "<tr><td><SELECT name =
\"country\"><option>Belgium</option><option> France
</option></SELECT><td></tr></table></form>";             //and more rows
$subject = "table to fill-in and send back";

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$myname." <".$myemail.">\r\n";
$headers .= "To: ".$contactname." <".$contactemail.">\r\n";
$headers .= "Reply-To: ".$myname." <$myreplyemail>\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: Just My Server";

mail($contactemail, $subject, $message, $headers);

Gillis




Sat, 21 May 2005 18:19:16 GMT  
 mail() problem
Hello,


Quote:
> Hi,

> I'm having problems sending email with the mail()function of php. I want to
> send an html-form in an email which contains a table which contains itself
> select-tag options.  I get the following warning :

> Warning: Failed to Receive in c:\program
> files\easyphp\www\mywebsql\timereg.php on line 59.

> When I leave out the options from de select- tag then I have no warning and
> my mail is sent properly (that is without the select options of course).

> Are there any restrictions in using html with the mail()function or  am I
> doing something wrong?

No, but the mail() function under Windows has problems starting from
useless error messages as you may see.

You may want to try this class that comes with a sub-class to send
messages via SMTP. There is a wrapper function named smtp_mail() that
emulates the mail() function. If the cause of the error above does not
go away, at least you get helpful error messages.

http://www.phpclasses.org/mimemessage

For sending via SMTP you also need this:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos



Sat, 21 May 2005 18:50:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Mail problems

2. Send Internet Mail PROBLEMS

3. Capesoft mail problems

4. Happy Birthday & Mail Problem

5. Mail problem at eiffel.com

6. Mailing problems ( Tommy)

7. LOGO-L> e-mail problem

8. Dataflow discussion falls foul of mail problems.

9. mail problems with this group

10. mail problem fixed, posting to usenet?

11. Temporary mail problems to python.org

12. For: Steven Warren -- Mail Problems -- C/COBOL structures

 

 
Powered by phpBB® Forum Software